aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted/boost/optional/README.md
blob: 4f73388d1ca4a9e931f365c585c2aa46305539fc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
optional
========

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

```cpp
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.