https://github.com/boostorg/optional
Boost.org optional module
https://github.com/boostorg/optional
Last synced: 9 months ago
JSON representation
Boost.org optional module
- Host: GitHub
- URL: https://github.com/boostorg/optional
- Owner: boostorg
- Created: 2013-01-13T15:58:51.000Z (almost 13 years ago)
- Default Branch: develop
- Last Pushed: 2025-03-15T16:57:49.000Z (10 months ago)
- Last Synced: 2025-03-28T14:11:15.420Z (10 months ago)
- Language: C++
- Homepage: http://boost.org/libs/optional
- Size: 2.61 MB
- Stars: 58
- Watchers: 7
- Forks: 68
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
optional
========
A library for representing optional (nullable) objects in C++.
```cpp
optional readInt(); // this function may return either an int or a not-an-int
if (optional oi = readInt()) // did I get a real int
cout << "my int is: " << *oi; // use my int
else
cout << "I have no int";
```
For more information refer to the documentation provided with this library.