{"id":20990552,"url":"https://github.com/offa/scope-guard","last_synced_at":"2026-02-28T15:31:51.189Z","repository":{"id":45738653,"uuid":"102041718","full_name":"offa/scope-guard","owner":"offa","description":"Implementation of Scoped Guards and Unique Resource as proposed in P0052.","archived":false,"fork":false,"pushed_at":"2025-11-11T18:34:58.000Z","size":653,"stargazers_count":54,"open_issues_count":1,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-11-11T20:31:51.872Z","etag":null,"topics":["cmake","cpp","cpp17","cpp20","p0052","raii","scope-exit","scope-fail","scope-guard","scope-success","unique-resource"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/offa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-08-31T20:23:44.000Z","updated_at":"2025-11-11T18:34:55.000Z","dependencies_parsed_at":"2023-11-27T17:28:15.120Z","dependency_job_id":"2ea7f35c-9cfa-49cd-a6d5-9095cd81d63d","html_url":"https://github.com/offa/scope-guard","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/offa/scope-guard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offa%2Fscope-guard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offa%2Fscope-guard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offa%2Fscope-guard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offa%2Fscope-guard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/offa","download_url":"https://codeload.github.com/offa/scope-guard/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offa%2Fscope-guard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29940284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T13:49:17.081Z","status":"ssl_error","status_checked_at":"2026-02-28T13:48:50.396Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","cpp","cpp17","cpp20","p0052","raii","scope-exit","scope-fail","scope-guard","scope-success","unique-resource"],"created_at":"2024-11-19T06:34:09.408Z","updated_at":"2026-02-28T15:31:51.167Z","avatar_url":"https://github.com/offa.png","language":"C++","readme":"# Scope Guard\n\n[![CI](https://github.com/offa/scope-guard/workflows/ci/badge.svg)](https://github.com/offa/scope-guard/actions)\n[![GitHub release](https://img.shields.io/github/release/offa/scope-guard.svg)](https://github.com/offa/scope-guard/releases)\n[![License](https://img.shields.io/badge/license-MIT-yellow.svg)](LICENSE)\n![C++](https://img.shields.io/badge/c++-17-green.svg)\n\nImplementation of *Scope Guards* (`scope_exit`, `scope_success`, `scope_fail`) and `unique_resource` as proposed in [**P0052R10**][1].\n\n\n## Compatibility\n\nThis implementation conforms to [P0052][1], except:\n\n###### Namespace\nThe namespace `sr` is used instead of `std`.\n\n###### Filenames\nThe filenames contain a `.h` extension. To enable the compatible header as specified in the document the CMake option `SCOPEGUARD_ENABLE_COMPAT_HEADER` can be used. This will generate and install an additional header named `scope` (without file extension).\n\n\n## Standardisation progress\n\n[P0052][1] has been adopted (2019-03) and is in the [*Library Fundamentals v3*][2] now.\n\n\n## Documentation\n\n- [*P0052R10 – Generic Scope Guard and RAII Wrapper for the Standard Library*][1] (P. Sommerlad, A. L. Sandoval, E. Niebler, D. Krügler)\n- [*N4853 – C++ Extensions for Library Fundamentals, Version 3*][2] (T. Köppe)\n\n\n## License\n\n**MIT License**\n\n    Copyright (c) 2017-2025 offa\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in all\n    copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n    SOFTWARE.\n\n\n[1]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0052r10.pdf\n[2]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/n4853.html\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foffa%2Fscope-guard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foffa%2Fscope-guard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foffa%2Fscope-guard/lists"}