You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the C++20 cycle [P0052 Generic Scope Guard and RAII Wrapper for the Standard Library](https://wg21.link/P0052) added 4 types: `scope_exit`, `scope_fail`, `scope_success` and `unique_resource` to [LTFSv3](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4908#scopeguard). In the intervening time, two standard libraries have implemented support as well as Boost. With the imperative for safety and security in C++ developers need every tool in the toolbox. The authors believe it is time to move this facility into the standard. The paper will re-examine the five year old design and any learning from deployment of the LTFSv3.
13
13
14
14
For discussions of this library see:
15
15
-[Discourse for discussion of scope](https://discourse.bemanproject.org/t/scope-library/315)
16
-
17
-
## Prior And Other Work
16
+
# Prior And Other Work
17
+
## Papers
18
18
- TS design and wording paper [p0052 - Generic Scope Guard and RAII Wrapper for the Standard Library](https://wg21.link/p0052)
19
19
- TS adoption paper [p1411 - Please reconsider <scope> for C++20](https://wg21.link/p1411)
20
-
- pointer to GSL (todo)
20
+
-[N3677 A Proposal to Add additional RAII Wrappers to the Standard Library](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3677.html)
-[scope_guard based on Andrei Alexandrescu and Petru Marginean article](https://ricab.github.io/scope_guard)
27
+
28
+
## Videos
29
+
-[Peter Sommerlad - Woes of Scope Guards and Unique_Resource - 5+ years in the making](https://www.youtube.com/watch?v=O1sK__G5Nrg)
30
+
-[Andrei Alexandrescu - Declarative Control Flow](https://www.youtube.com/watch?v=WjTrfoiB0MQ)
31
+
22
32
# Examples
23
33
-[TS example of scope_exit](https://godbolt.org/z/T5KhTYjP7)
24
34
25
35
---
26
36
27
-
`beman.scope` is a minimal C++ library conforming to [The Beman Standard](https://github.com/bemanproject/beman/blob/main/docs/BEMAN_STANDARD.md).
28
-
This can be used as a template for those intending to write Beman libraries.
29
-
It may also find use as a minimal and modern C++ project structure.
37
+
`beman.scope` is a C++ library conforming to [The Beman Standard](https://github.com/bemanproject/beman/blob/main/docs/BEMAN_STANDARD.md).
30
38
31
-
**Implements**: `std::identity` proposed in [Standard Library Concepts (P0898R3)](https://wg21.link/P0898R3).
39
+
**Implements**: TODO
32
40
33
41
**Status**: [Under development and not yet ready for production use.](https://github.com/bemanproject/beman/blob/main/docs/BEMAN_LIBRARY_MATURITY_MODEL.md#under-development-and-not-yet-ready-for-production-use)
34
42
35
43
## Usage
36
44
37
-
`std::identity` is a function object type whose `operator()` returns its argument unchanged.
38
-
`std::identity` serves as the default projection in constrained algorithms.
39
-
Its direct usage is usually not needed.
45
+
TODO
40
46
41
47
### Example Usage
42
48
@@ -100,9 +106,7 @@ apt-get install \
100
106
101
107
### How to build beman.scope
102
108
103
-
This project strives to be as normal and simple a CMake project as possible.
104
-
This build workflow in particular will work,
105
-
producing a static `libbeman.scope.a` library, ready to package with its headers:
0 commit comments