tree: 4143aceb54e176b077bc455e3f6d7cd1288a18ee [path history] [tgz]
  1. doc/
  2. include/
  3. meta/
  4. test/
  5. .gitattributes
  6. .travis.yml
  7. BUILD
  8. index.html
  9. README.md
third_party/boostorg/optional/README.md

optional

A library for representing optional (nullable) objects in C++.

optional<int> readInt(); // this function may return either an int or a not-an-int

if (optional<int> 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.