1
0
Fork 0
arangodb/3rdParty/boost/1.71.0/libs/optional
Jan Christoph Uhde 8087059f20 upgrade boost to version 1.71.0 (#10299) 2019-10-22 18:46:18 +02:00
..
meta upgrade boost to version 1.71.0 (#10299) 2019-10-22 18:46:18 +02:00
test upgrade boost to version 1.71.0 (#10299) 2019-10-22 18:46:18 +02:00
README.md upgrade boost to version 1.71.0 (#10299) 2019-10-22 18:46:18 +02:00

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.