8#include <boost/test/unit_test.hpp>
83 [&]() ->
void {
return e.value(); }();
84 [&]() ->
void {
return *
e; }();
121 const auto moved{std::move(u).error()};
The util::Expected class provides a standard way for low-level functions to return either error value...
T value_or(U &&default_value) const &
constexpr const T & value() const &LIFETIMEBOUND
constexpr void swap(Expected &other) noexcept
The util::Unexpected class represents an unexpected value stored in util::Expected.
constexpr const E & error() const &noexcept LIFETIMEBOUND
BOOST_AUTO_TEST_SUITE_END()
#define BOOST_CHECK_THROW(stmt, excMatch)
#define BOOST_CHECK_EQUAL(v1, v2)
#define BOOST_CHECK(expr)
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.
BOOST_AUTO_TEST_CASE(expected_value)