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
[](https://coveralls.io/github/steve-downey/expected?branch=main)[](https://www.example.com)
9
9
10
-
`beman.expected` is a minimal C++ library conforming to [The Beman Standard](https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md).
11
-
This can be used as a template for those intending to write Beman libraries.
12
-
It may also find use as a minimal and modern C++ project structure.
10
+
`beman.expected` is a C++ library implementing the std::expected specification conforming to [The Beman Standard](https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md).
13
11
14
-
**Implements**: `std::identity` proposed in [Standard Library Concepts (PnnnnRr)](https://wg21.link/PnnnnRr).
12
+
**Implements**: `std::expected` proposed in [Expected over References (PnnnnRr)](https://wg21.link/PnnnnRr).
15
13
16
14
**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)
17
15
@@ -21,66 +19,6 @@ It may also find use as a minimal and modern C++ project structure.
21
19
22
20
## Usage
23
21
24
-
`std::identity` is a function object type whose `operator()` returns its argument unchanged.
25
-
`std::identity` serves as the default projection in constrained algorithms.
26
-
Its direct usage is usually not needed.
27
-
28
-
### Usage: default projection in constrained algorithms
29
-
30
-
The following code snippet illustrates how we can achieve a default projection using `beman::expected::identity`:
31
-
32
-
```cpp
33
-
#include<beman/expected/identity.hpp>
34
-
35
-
namespaceexe = beman::expected;
36
-
37
-
// Class with a pair of values.
38
-
struct Pair
39
-
{
40
-
int n;
41
-
std::string s;
42
-
43
-
// Output the pair in the form {n, s}.
44
-
// Used by the range-printer if no custom projection is provided (default: identity projection).
0 commit comments