15 #ifndef A_UTIL_UTIL_RESULT_DETAIL_RESULT_INFO_IMPL_HEADER_INCLUDED
16 #define A_UTIL_UTIL_RESULT_DETAIL_RESULT_INFO_IMPL_HEADER_INCLUDED
23 template <
typename ResultType>
24 inline bool isOk(
const ResultType& result)
26 return (ResultType() == result);
29 template <
typename ResultType>
32 return !(
isOk(result));
57 template <
typename ResultTypeLHS,
typename ResultTypeRHS>
65 template <
typename ResultTypeLHS,
typename ResultTypeRHS>
71 template <
typename ResultTypeLHS,
typename ResultTypeRHS>
77 template <
typename ResultTypeLHS,
typename ResultTypeRHS>
83 template <
typename ResultTypeLHS,
typename ResultTypeRHS>
89 template <
typename ResultTypeLHS,
typename ResultTypeRHS>
void maybe_unused(T &&)
Mimics C++17 attribute maybe_unused to silence compiler warnings on potentially unused enitities.
bool operator>(const ResultInfo< ResultTypeLHS > &lhs, const ResultInfo< ResultTypeRHS > &rhs)
Greater-than operator for two specialized result information objects.
bool operator<=(const ResultInfo< ResultTypeLHS > &lhs, const ResultInfo< ResultTypeRHS > &rhs)
Less-than-or-equal operator for two specialized result information objects.
bool operator==(const ResultInfo< ResultTypeLHS > &lhs, const ResultInfo< ResultTypeRHS > &rhs)
Compare two specialized result information objects for equality.
bool isOk(const ResultType &result)
Check whether a return value indicates a successful function execution.
bool isFailed(const ResultType &result)
Check whether a return value indicates an unsuccessful function execution.
bool operator<(const ResultInfo< ResultTypeLHS > &lhs, const ResultInfo< ResultTypeRHS > &rhs)
Less-than operator for two specialized result information objects.
bool operator!=(const ResultInfo< ResultTypeLHS > &lhs, const ResultInfo< ResultTypeRHS > &rhs)
Compare two specialized result information objects for inequality.
bool operator>=(const ResultInfo< ResultTypeLHS > &lhs, const ResultInfo< ResultTypeRHS > &rhs)
Greater-than-or-equal operator for two specialized result information objects.
Serves as the root component, with common functionality documented in core functionality.
Public API for ResultInfo type, functions and macros.
Basic result information template, used by a_util::result::Result.
static std::int32_t getCode()
Get the result code distributed with value of type T.
static const char * getLabel()
Get the string representation of an error code distributed by value of type T.
Public types and functions defining a_util core functionality.