5.0.0
Freundlich's C++ toolkit
|
A class that either holds a success or an error value.
This class is a wrapper around std::expected
. The changes are:
operator->
, operator*
or value
function. This has been replaced get_success_unsafe
. error
function. This has been replaced with get_failure_unsafe
. Success
. Assign an either instead. Failure | Must be move constructible. |
Success | Must be move constructible. |
Public Types | |
using | failure = Failure |
using | success = Success |
using | std_type = std::expected<Success, Failure> |
Public Member Functions | |
object (Success &&) | |
object (Success const &) | |
object (Failure &&) | |
object (Failure const &) | |
bool | has_success () const |
bool | has_failure () const |
Success & | get_success_unsafe () |
Success const & | get_success_unsafe () const |
Failure & | get_failure_unsafe () |
Failure const & | get_failure_unsafe () const |
std_type & | impl () |
std_type const & | impl () const |
using fcppt::either::object< Failure, Success >::failure = Failure |
using fcppt::either::object< Failure, Success >::std_type = std::expected<Success, Failure> |
using fcppt::either::object< Failure, Success >::success = Success |
|
explicit |
|
explicit |
|
explicit |
|
explicit |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |