结果类型的基类(trivial type) 更多...
#include <mm_result.hpp>
Public 类型 | |
using | value_type = T |
using | error_type = E |
using | reference_value_type = T & |
using | reference_error_type = E & |
using | const_reference_value_type = const T & |
using | const_reference_error_type = const E & |
Public 成员函数 | |
constexpr | result_trivial_base (T succ_val) |
从succ value构造 | |
constexpr | result_trivial_base (E err_val) |
从err value构造 | |
result_trivial_base (result_trivial_base &&)=default | |
result_trivial_base (const result_trivial_base &)=default | |
result_trivial_base & | operator= (result_trivial_base &&)=default |
result_trivial_base & | operator= (const result_trivial_base &)=default |
~result_trivial_base ()=default | |
Protected 类型 | |
enum class | TypeTag { SuccTag = 0 , ErrorTag = 1 } |
类型标签 更多... | |
Protected 属性 | |
TypeTag | type_tag |
类型标签 | |
Private 属性 | ||
union { | ||
T t_val | ||
E e_val | ||
}; | ||
结果类型的基类(trivial type)
using mtfmt::details::result_trivial_base< T, E >::error_type = E |
using mtfmt::details::result_trivial_base< T, E >::reference_error_type = E& |
using mtfmt::details::result_trivial_base< T, E >::reference_value_type = T& |
using mtfmt::details::result_trivial_base< T, E >::value_type = T |
|
strongprotected |
|
inlineconstexpr |
从succ value构造
|
inlineconstexpr |
从err value构造
|
default |
|
default |
|
default |
|
default |
|
default |
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
union { ... } mtfmt::details::result_trivial_base< T, E > |
|
protected |
类型标签