libboost-optional/1.87.0

[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.87.0
license BSL-1.0Boost Software License 1.0
repository https://pkg.cppget.org/1/stable
download libboost-optional-1.87.0.tar.gz
sha256 4ef906407ebb30e17f1b70dbace45fe7cb36b95a91d73a62d540028d918c59cd
project boost
url github.com/boostorg/optional
doc-url www.boost.org/doc/libs/1_87_0/libs/optional
package-url github.com/build2-packaging/boost
package-email packaging@build2.orgMailing list
topics C++Boost

Depends (5)

libboost-assert == 1.87.0
libboost-config == 1.87.0
libboost-core == 1.87.0
libboost-throw-exception == 1.87.0
libboost-type-traits == 1.87.0

Reviews

fail 0
pass 1

Builds

toolchain public-0.18.1
target aarch64-linux-gnu
tgt config linux_debian_12-gcc_13
timestamp 2026-08-09 12:32:27 UTC (19:54:18 hours ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-microsoft-win32-msvc14.5
tgt config windows_10-msvc_18-static_O2
timestamp 2026-08-08 00:41:08 UTC (02 07:45:37 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-microsoft-win32-msvc14.5
tgt config windows_10-msvc_18-O2
timestamp 2026-08-08 00:40:45 UTC (02 07:46:00 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-microsoft-win32-msvc14.5
tgt config windows_10-msvc_18
timestamp 2026-08-08 00:39:24 UTC (02 07:47:21 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-microsoft-win32-msvc14.5
tgt config windows_10-clang_21_msvc_18-static_O2
timestamp 2026-08-08 00:08:26 UTC (02 08:18:19 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-microsoft-win32-msvc14.5
tgt config windows_10-clang_21_msvc_18-O2
timestamp 2026-08-08 00:07:56 UTC (02 08:18:49 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-microsoft-win32-msvc14.5
tgt config windows_10-clang_21_msvc_18
timestamp 2026-08-08 00:06:49 UTC (02 08:19:56 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-w64-mingw32
tgt config windows_10-gcc_15.2_mingw_w64-static_O2
timestamp 2026-08-05 01:41:57 UTC (05 06:44:48 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-w64-mingw32
tgt config windows_10-gcc_15.2_mingw_w64-O2
timestamp 2026-08-05 01:41:03 UTC (05 06:45:42 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-w64-mingw32
tgt config windows_10-gcc_15.2_mingw_w64
timestamp 2026-08-05 01:37:56 UTC (05 06:48:49 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-linux-gnu
tgt config linux_ubuntu_26.04-gcc_15-bindist
timestamp 2026-08-04 21:11:39 UTC (05 11:15:06 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-apple-darwin23.5.0
tgt config macos_14-clang_15.0-static_O3
timestamp 2026-08-02 12:13:24 UTC (07 20:13:21 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-apple-darwin23.5.0
tgt config macos_14-clang_15.0-O3
timestamp 2026-08-02 12:12:34 UTC (07 20:14:11 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-apple-darwin23.5.0
tgt config macos_14-clang_15.0
timestamp 2026-08-02 12:11:41 UTC (07 20:15:04 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-linux-gnu
tgt config linux_fedora_44-gcc_16-bindist
timestamp 2026-08-01 19:11:00 UTC (08 13:15:45 days ago)
result success | log | rebuild
toolchain public-0.18.1
target aarch64-linux-gnu
tgt config linux_debian_12-clang_18_libc++-static_O3
timestamp 2026-07-29 03:27:54 UTC (12 04:58:51 days ago)
result success | log | rebuild
toolchain public-0.18.1
target aarch64-linux-gnu
tgt config linux_debian_12-clang_18_libc++-O3
timestamp 2026-07-29 03:27:02 UTC (12 04:59:43 days ago)
result success | log | rebuild
toolchain public-0.18.1
target aarch64-linux-gnu
tgt config linux_debian_12-clang_18_libc++
timestamp 2026-07-29 03:26:06 UTC (12 05:00:39 days ago)
result success | log | rebuild
toolchain public-0.18.1
target aarch64-linux-gnu
tgt config linux_debian_12-clang_18-static_O3
timestamp 2026-07-29 03:25:13 UTC (12 05:01:32 days ago)
result success | log | rebuild
toolchain public-0.18.1
target aarch64-linux-gnu
tgt config linux_debian_12-clang_18-O3
timestamp 2026-07-29 03:24:11 UTC (12 05:02:34 days ago)
result success | log | rebuild
toolchain public-0.18.1
target aarch64-linux-gnu
tgt config linux_debian_12-clang_18
timestamp 2026-07-29 03:23:15 UTC (12 05:03:30 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-msvc_17
timestamp 2026-07-28 17:01:31 UTC (12 15:25:14 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-linux-gnu
tgt config linux_debian_13-clang_22_libc++-static_O3
timestamp 2026-07-27 13:09:48 UTC (13 19:16:57 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-linux-gnu
tgt config linux_debian_13-clang_22_libc++-O3
timestamp 2026-07-27 13:09:38 UTC (13 19:17:07 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-linux-gnu
tgt config linux_debian_13-clang_22_libc++
timestamp 2026-07-27 13:09:11 UTC (13 19:17:34 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-linux-gnu
tgt config linux_debian_13-clang_22-static_O3
timestamp 2026-07-27 13:09:04 UTC (13 19:17:41 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-linux-gnu
tgt config linux_debian_13-clang_22-O3
timestamp 2026-07-27 13:08:58 UTC (13 19:17:47 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-linux-gnu
tgt config linux_debian_13-clang_22
timestamp 2026-07-27 13:08:25 UTC (13 19:18:20 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-linux-gnu
tgt config linux_fedora_43-gcc_15-bindist
timestamp 2026-07-27 12:33:01 UTC (13 19:53:45 days ago)
result success | log | rebuild
toolchain public-0.18.1
target aarch64-linux-gnu
tgt config linux_debian_12-gcc_14-ndebug_O3
timestamp 2026-07-27 12:27:28 UTC (13 19:59:17 days ago)
result success | log | rebuild
toolchain public-0.18.1
target aarch64-linux-gnu
tgt config linux_debian_12-gcc_14-static_O3
timestamp 2026-07-27 12:26:56 UTC (13 19:59:49 days ago)
result success | log | rebuild
toolchain public-0.18.1
target aarch64-linux-gnu
tgt config linux_debian_12-gcc_14-O3
timestamp 2026-07-27 12:26:24 UTC (13 20:00:21 days ago)
result success | log | rebuild
toolchain public-0.18.1
target aarch64-linux-gnu
tgt config linux_debian_12-gcc_14
timestamp 2026-07-27 12:25:50 UTC (13 20:00:55 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-linux-gnu
tgt config linux_debian_13-gcc_16-static_O3
timestamp 2026-07-27 12:21:56 UTC (13 20:04:49 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-linux-gnu
tgt config linux_debian_13-gcc_16
timestamp 2026-07-27 12:21:47 UTC (13 20:04:58 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-linux-gnu
tgt config linux_debian_13-gcc_16-O3
timestamp 2026-07-27 12:21:30 UTC (13 20:05:15 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-linux-gnu
tgt config linux_debian_13-gcc_16-ndebug_O3
timestamp 2026-07-27 12:21:11 UTC (13 20:05:34 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-apple-darwin22.5.0
tgt config macos_13-clang_15.0
timestamp 2026-07-27 12:18:01 UTC (13 20:08:44 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-linux-gnu
tgt config linux_debian_13-gcc_14-bindist
timestamp 2026-07-27 12:05:45 UTC (13 20:21:00 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-linux-gnu
tgt config linux_ubuntu_24.04-gcc_13-bindist
timestamp 2026-07-27 11:57:35 UTC (13 20:29:10 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-freebsd15.0
tgt config freebsd_15-clang_19-static_O3
timestamp 2026-07-27 11:54:24 UTC (13 20:32:21 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-freebsd15.0
tgt config freebsd_15-clang_19-O3
timestamp 2026-07-27 11:54:13 UTC (13 20:32:32 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-freebsd15.0
tgt config freebsd_15-clang_19
timestamp 2026-07-27 11:54:10 UTC (13 20:32:35 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-linux-gnu
tgt config linux_debian_13-gcc_15-O3
timestamp 2026-07-27 11:52:54 UTC (13 20:33:52 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-linux-gnu
tgt config linux_debian_13-clang_21_libc++
timestamp 2026-07-27 11:52:40 UTC (13 20:34:05 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-linux-gnu
tgt config linux_debian_13-gcc_15
timestamp 2026-07-27 11:51:57 UTC (13 20:34:48 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-linux-gnu
tgt config linux_debian_13-clang_21
timestamp 2026-07-27 11:51:47 UTC (13 20:34:58 days ago)
result success | log | rebuild
toolchain public-0.18.1
target x86_64-freebsd14.1
tgt config freebsd_14-clang_18
timestamp 2026-07-27 11:50:59 UTC (13 20:35:46 days ago)
result success | log | rebuild
target x86_64-apple-darwin23.5.0
tgt config macos_14-gcc_14_homebrew
result excluded (https://github)
target x86_64-apple-darwin23.5.0
tgt config macos_14-gcc_14_homebrew-O3
result excluded (https://github)
target x86_64-apple-darwin23.5.0
tgt config macos_14-gcc_14_homebrew-static_O3
result excluded (https://github)