|
| | ResultValue (R result) noexcept |
| | Initializes result.
|
| |
| | ResultValue (R result, V &&value) noexcept |
| | Initializes result.
|
| |
| const V & | getValue () const noexcept |
| | Gets result value.
|
| |
| V && | takeValue () noexcept |
| | Gets result value as rvalue.
|
| |
| const V * | operator-> () const noexcept |
| | Gets result value.
|
| |
| | Result (R error) noexcept |
| | Initializes result.
|
| |
|
| Result () noexcept |
| | Initializes result by default.
|
| |
| R | getError () const noexcept |
| | Gets actual result value.
|
| |
| bool | isError () const noexcept |
| | Checks for an error.
|
| |
| bool | isOk () const noexcept |
| | Checks for a success.
|
| |
| | operator bool () const noexcept |
| | Checks for a success.
|
| |
|
| operator int () const noexcept=delete |
| | Values of type bool participate in integral promotions. A prvalue of type bool can be converted to a prvalue of type int, with false becoming zero and true becoming one. This overload prevents the bool() operator above from participating in dangerous implicit conversion chains such as bool->int, bool->int->float, bool->int->double.
|
| |
| const char * | what () const noexcept |
| | Gets a textual description of the result.
|
| |
template<typename R, typename V>
struct fsdk::ResultValue< R, V, typename std::enable_if< std::is_copy_constructible< V >::value==false >::type >
Addon for Result to output some value aside the result. Specialization for non copiable types.
- Template Parameters
-
| R | result enumeration type. |
| V | result value type. |
- Note
- All rules for Result template parameter aplly to R.
-
V instance is always held by value despite -> operators.