thrust::system::error_condition#
-
class error_condition#
The class
error_conditiondescribes an object used to hold values identifying error conditions.Note
error_conditionvalues are portable abstractions, whileerror_codevalues are implementation specific.Public Functions
-
inline error_condition()#
Constructs an object of type
error_condition.- Post:
value() == 0.- Post:
category() == generic_category().
-
inline error_condition(int val, const error_category &cat)#
Constructs an object of type
error_condition.- Post:
value() == val.- Post:
category() == cat.
-
template<typename ErrorConditionEnum>
error_condition( - ErrorConditionEnum e,
- ::cuda::std::enable_if_t<is_error_condition_enum<ErrorConditionEnum>::value>* = 0,
Constructs an object of type
error_condition.Note
This constructor shall not participate in overload resolution unless
is_error_condition_enum<ErrorConditionEnum>::valueistrue.- Post:
*this == make_error_condition(e).
-
inline void assign(int val, const error_category &cat)#
Assigns to this
error_codeobject from an error value and anerror_category.- Parameters:
val – The new value to return from
value().cat – The new
error_categoryto return fromcategory().
- Post:
value() == val.- Post:
category() == cat.
-
template<typename ErrorConditionEnum>
::cuda::std::enable_if_t<is_error_condition_enum<ErrorConditionEnum>::value, error_condition> &operator=(
)# Assigns to this
error_codeobject from an error condition enumeration.Note
This operator shall not participate in overload resolution unless
is_error_condition_enum<ErrorConditionEnum>::valueistrue.- Returns:
*this
- Post:
*this == make_error_condition(e).
-
inline void clear()#
Clears this
error_codeobject.- Post:
value == 0- Post:
category() == generic_category().
-
inline int value() const#
- Returns:
The value encoded by this
error_condition.
-
inline const error_category &category() const#
- Returns:
A
constreference to theerror_categoryencoded by thiserror_condition.
-
inline std::string message() const#
- Returns:
category().message(value()).
-
inline error_condition()#