template<typename T>
class maxon::ResultMemT< T >
ResultMemT can be used as return type of functions which normally return a T, but might fail only due to an out-of-memory situation and indicate this by the default value of T. The typical use-case is for pointers or strong/unique references. You can't use ResultMemT when the default value of T shall be a legal return value of the function, in that case you have to use Result.
- See also
- ResultMem
-
ResultPtr
|
| | ResultMemT () |
| |
| MAXON_IMPLICIT | ResultMemT (ERROR_FAILED) |
| |
| MAXON_IMPLICIT | ResultMemT (const T &value) |
| |
| MAXON_IMPLICIT | ResultMemT (T &&value) |
| |
| MAXON_IMPLICIT | ResultMemT (ERROR_OK) |
| |
| MAXON_IMPLICIT | ResultMemT (ResultOk< void >) |
| |
| | ResultMemT (const ResultMemT &)=default |
| |
| ResultMemT & | operator= (const ResultMemT &)=default |
| |
| | ResultMemT (ResultMemT &&)=default |
| |
| ResultMemT & | operator= (ResultMemT &&)=default |
| |
| template<typename T2 , typename = typename std::enable_if<STD_IS_REPLACEMENT(constructible, T, T2*) && STD_IS_REPLACEMENT(pointer, T)>::type> |
| MAXON_IMPLICIT | ResultMemT (const ResultMemT< T2 * > &result) |
| |
| template<typename T2 , typename = typename std::enable_if<STD_IS_REPLACEMENT(constructible, T, T2*) && STD_IS_REPLACEMENT(pointer, T)>::type> |
| MAXON_IMPLICIT | ResultMemT (ResultMemT< T2 * > &&result) |
| |
| template<typename T2 , typename = typename std::enable_if<STD_IS_REPLACEMENT(constructible, T, T2) && STD_IS_REPLACEMENT(pointer, T) == STD_IS_REPLACEMENT(pointer, T2)>::type> |
| MAXON_IMPLICIT | ResultMemT (const ResultMemT< T2 > &result) |
| |
| template<typename T2 , typename = typename std::enable_if<STD_IS_REPLACEMENT(constructible, T, T2) && STD_IS_REPLACEMENT(pointer, T) == STD_IS_REPLACEMENT(pointer, T2)>::type> |
| MAXON_IMPLICIT | ResultMemT (ResultMemT< T2 > &&result) |
| |
| template<typename T2 > |
| MAXON_IMPLICIT | ResultMemT (const ResultRef< T2 > &result) |
| |
| Bool | operator== (ERROR_OK ok) const |
| |
| Bool | operator== (ERROR_FAILED failed) const |
| |
| const T & | GetValue () const & |
| |
| const T & | UncheckedGetValue () const & |
| |
| | MAXON_MEMBER_ACCESSORS (T, GetValue) |
| |
| | MAXON_MEMBER_ACCESSORS (T, UncheckedGetValue) |
| |
| T | GetPointer () const |
| |