mirror of
https://github.com/boostorg/optional.git
synced 2025-07-29 20:17:21 +02:00
825f38f5b5a7ec83e96906f12bc31f8b9b14ea47
Since CMake 3.19 it is possible to specify private sources for `INTERFACE` targets. This makes the library turn up like compiled libraries in IDEs such as Visual Studio. It can also be specified in the `add_library` call but using `target_sources` is more isolated to the CMake version check
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.
Description
Languages
C++
98.5%
CMake
0.9%
Shell
0.4%
HTML
0.2%