libboost-optional/1.77.0+1

[full]

A value-semantic, type-safe wrapper for representing 'optional' (or 'nullable') objects of a given type. An optional object may or may not contain a value of the underlying type

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.

version 1.77.0+1
license BSL-1.0Boost Software License 1.0
repository https://pkg.cppget.org/1/legacy
download libboost-optional-1.77.0+1.tar.gz
sha256 ce98405319f8e681057399c7c416f6a01979d190ad7882fa770b34782104f5d1
project boost
url github.com/boostorg/optional
doc-url www.boost.org/doc/libs/1_77_0/libs/optional
package-url github.com/build2-packaging/boost
package-email packaging@build2.orgMailing list
topics C++Boost

Depends (10)

libboost-assert == 1.77.0
libboost-config == 1.77.0
libboost-core == 1.77.0
libboost-detail == 1.77.0
libboost-move == 1.77.0
libboost-predef == 1.77.0
libboost-static-assert == 1.77.0
libboost-throw-exception == 1.77.0
libboost-type-traits == 1.77.0
libboost-utility == 1.77.0

Reviews

fail 0
pass 1