optional
C++11/14/17 std::optional with functional-style extensions and reference support (by TartanLlama)
optional
Monadic interface for std::optional (by stilgarpl)
optional | optional | |
---|---|---|
5 | 3 | |
885 | 10 | |
0.9% | - | |
0.0 | 0.0 | |
10 months ago | over 3 years ago | |
C++ | C++ | |
Creative Commons Zero v1.0 Universal | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
optional
Posts with mentions or reviews of optional.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-08-13.
- Functional Programming in Modern C++: The Imperatives Must Go – Victor Ciura [video]
-
Backward compatible implementations of newer standards constructs?
For optional I would recommend Sy's implementation - optional
-
What is your preferred solution repeated nullptr checks on smart pointers
One could think of a more fluent interface to deal with smart pointers, similar to what exists in tl optional https://github.com/TartanLlama/optional
-
Assignment for optional<T>
It looks like tl::optional<>.
- Monadic interface for std::optional
optional
Posts with mentions or reviews of optional.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-08-29.
-
Cleaner way to choose arguments
If you want to use monadic interface for std::optional (as u/Nobody_1707 suggested) before C++ you can use my tiny library. It's header only and modeled after Java optional and std::ranges https://github.com/stilgarpl/optional
-
std::optional good practices?
You can use this tiny library that adds monadic interface for std::optional (we should get one in C++23, this is just for the meantime.
- Monadic interface for std::optional
What are some alternatives?
When comparing optional and optional you can also consider the following projects:
variant - C++17 `std::variant` for C++11/14/17
nonstd-lite - Parent of *-lite repositories, a migration path to post-C++11 features for pre-C++11 environments
expected - C++11/14/17 std::expected with functional-style extensions
GSL - Guidelines Support Library