|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Exception thrown by expected::value() when no value is held.
More...
#include <ah-cpp-compat.H>
Public Member Functions | |
| bad_expected_access (E e) | |
| Construct with an error value. | |
| const char * | what () const noexcept override |
| Get exception description. | |
| const E & | error () const &noexcept |
| Access the stored error (const lvalue). | |
| E & | error () &noexcept |
| Access the stored error (lvalue). | |
Private Attributes | |
| E | err_ |
Exception thrown by expected::value() when no value is held.
Thrown when calling value() on an expected in the error state. Carries a copy of the stored error for inspection.
| E | Error type (must be movable). |
what() and error() are safe to call concurrently on the same object. Definition at line 242 of file ah-cpp-compat.H.
|
inlineexplicit |
Construct with an error value.
| e | The error to store in the exception. |
| Any | exception thrown by E's move constructor. |
Definition at line 251 of file ah-cpp-compat.H.
|
inlinenoexcept |
Access the stored error (lvalue).
Definition at line 272 of file ah-cpp-compat.H.
References Aleph::bad_expected_access< E >::err_.
|
inlinenoexcept |
Access the stored error (const lvalue).
Definition at line 266 of file ah-cpp-compat.H.
References Aleph::bad_expected_access< E >::err_.
|
inlineoverridenoexcept |
Get exception description.
Definition at line 257 of file ah-cpp-compat.H.
|
private |
Definition at line 244 of file ah-cpp-compat.H.
Referenced by Aleph::bad_expected_access< E >::error(), and Aleph::bad_expected_access< E >::error().