|
FastLED 3.9.15
|
Specialization for void (no value to return)
Uses fl::variant<VoidSuccess, ErrorInfo<E>> for consistent implementation
| E | The type of the error code (must be an enum or integral type) |
Definition at line 148 of file expected.h.
#include <expected.h>
Inheritance diagram for fl::expected< void, E >:
Collaboration diagram for fl::expected< void, E >:Public Member Functions | |
| expected () FL_NOEXCEPT | |
| Default constructor (creates error state) | |
| expected () FL_NOEXCEPT | |
| Default constructor (creates error state) | |
| expected (const expected &other) FL_NOEXCEPT | |
| Copy constructor (needed for some use cases like Impl initialization) | |
| expected (expected &&other) FL_NOEXCEPT=default | |
| Move constructor (defaulted - variant handles it) | |
| expected (expected &&other) FL_NOEXCEPT=default | |
| Move constructor (defaulted - variant handles it) | |
| ~expected () FL_NOEXCEPT=default | |
| Destructor (defaulted - variant handles cleanup) | |
| ~expected () FL_NOEXCEPT=default | |
| Destructor (defaulted - variant handles cleanup) | |
| E | error () const FL_NOEXCEPT |
| Get error code (only meaningful if !ok()) | |
| E | error () const FL_NOEXCEPT |
| bool | has_value () const FL_NOEXCEPT |
| Check if operation succeeded (alias for ok()) | |
| const char * | message () const FL_NOEXCEPT |
| Get error message (only meaningful if !ok()) | |
| const char * | message () const FL_NOEXCEPT |
| bool | ok () const FL_NOEXCEPT |
| Check if operation succeeded. | |
| bool | ok () const FL_NOEXCEPT |
| operator bool () const FL_NOEXCEPT | |
| Explicit conversion to bool for contextual evaluation. | |
| operator bool () const FL_NOEXCEPT | |
| expected & | operator= (const expected &other) FL_NOEXCEPT |
| Copy assignment. | |
| expected & | operator= (expected &&other) FL_NOEXCEPT=default |
| Move assignment (defaulted - variant handles it) | |
| expected & | operator= (expected &&other) FL_NOEXCEPT=default |
| Move assignment (defaulted - variant handles it) | |
| const void & | value () const FL_NOEXCEPT |
| void & | value () FL_NOEXCEPT |
| Get value (only valid if ok() == true) | |
Static Public Member Functions | |
| static expected | failure (E err, const char *msg=nullptr) FL_NOEXCEPT |
| Create error result. | |
| static expected | failure (E err, const char *msg=nullptr) FL_NOEXCEPT |
| static expected | success () FL_NOEXCEPT |
| static expected | success (void value) FL_NOEXCEPT |
| Create successful result. | |
Private Member Functions | |
| expected (const expected &) FL_NOEXCEPT=delete | |
| expected & | operator= (const expected &) FL_NOEXCEPT=delete |
Private Attributes | |
| fl::variant< void, ErrorInfo< E > > | mData |
| fl::variant< VoidSuccess, ErrorInfo< E > > | mData |