![]() |
Utilities
Utilities header only library
|
std::optional specialization of the Strong type pattern. More...
Public Types | |
| using | OptionalValueType = std::optional< ValueType > |
Public Member Functions | |
| StrongOptionalType< ValueType, PhantomType > & | operator= (const OptionalValueType &value) |
| bool | HasValue () const |
| Proxy function to access the underlying optional's has_value() function. | |
| const ValueType & | Value () const |
| Proxy function to access the underlying optional's value() function. | |
Public Member Functions inherited from utils::StrongType< std::optional< ValueType >, PhantomType > | |
| StrongType (std::optional< ValueType > value) | |
| std::enable_if_t< std::is_arithmetic_v< RT >, RT > | As () const |
| Cast to a specified type. Only work for arithmetic types. | |
| bool | operator== (const StrongType &other) const |
| bool | operator!= (const StrongType &other) const |
| bool | operator< (const StrongType &other) const |
| bool | operator> (const StrongType &other) const |
| const std::optional< ValueType > & | operator* () const |
| Get underlying value using the * operator. | |
Additional Inherited Members | |
Protected Attributes inherited from utils::StrongType< std::optional< ValueType >, PhantomType > | |
| std::optional< ValueType > | value_ |
| The actual underlying value. | |
std::optional specialization of the Strong type pattern.