Squashed 'third_party/boostorg/optional/' content from commit 155ad59

Change-Id: I4ad7a1e7b295a6136c5a0d7b6c11700e76b939b5
git-subtree-dir: third_party/boostorg/optional
git-subtree-split: 155ad5911e5683cc87d34363f8304b60a30a8345
196 files changed
tree: a91f622b31f4996b06e9700aba8f22b73303fcbd
  1. doc/
  2. include/
  3. meta/
  4. test/
  5. .gitattributes
  6. .travis.yml
  7. index.html
  8. README.md
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.