26 #include <type_traits>
40 template <
typename T >
49 template <
typename T >
54 "Undefined error category used. Specialize error_category for this type." );
57 template <
typename T >
60 template <
typename T >
72 return code ?
"true" :
"false";
81 template <
typename T >
94 [[nodiscard]] constexpr
char const*
message() const noexcept
96 return category_->message( code_ );
104 [[nodiscard]] constexpr
operator bool() const noexcept
116 template <
typename T >
118 [[nodiscard]] constexpr
bool operator==( T x )
const noexcept
message(Ts... inpt) -> message< sizeof...(Ts) >
MIT License.
Definition: impl.h:31
undefined_error_category< T > const error_category_v
Definition: error_code.h:58
concept error_type
Definition: error_code.h:61
bool_category const error_category_v< bool >
Definition: error_code.h:77
requires(!range_container< Container >) const expr std
Returns index of an element in tuple 't', for which call to predicate f(x) holds true,...
Definition: algorithm.h:127
uint32_t error_value_type
Definition: error_code.h:31
constexpr bool operator==(pose const &x, pose const &y)
compares poses on their position and orientation
Definition: pose.h:93
Definition: error_code.h:34
virtual char const * message(error_value_type) const noexcept=0
virtual ~_error_category()=default
Definition: error_code.h:64
char const * message(error_value_type code) const noexcept override
Definition: error_code.h:70
constexpr error_value_type cast(bool x) const
Definition: error_code.h:65
Definition: error_code.h:42
constexpr error_value_type cast(T &x) const
Definition: error_code.h:43
Definition: error_code.h:80
constexpr bool operator==(error_code const &) const noexcept=default
constexpr error_code(error_code &&) noexcept=default
constexpr error_code(error_code const &) noexcept=default
constexpr error_value_type value() const noexcept
Definition: error_code.h:109
requires(!std::same_as< std::remove_cvref_t< T >, error_code > &&error_type< T >) error_code(T x)
Definition: error_code.h:82
_error_category const * category_
Definition: error_code.h:125
requires(!std::same_as< std::remove_cvref_t< T >, error_code > &&error_type< T >) const expr bool operator
constexpr _error_category const & category() const noexcept
Definition: error_code.h:99
Definition: error_code.h:51