thrust::system::error_category

Defined in thrust/system/error_code.h

class error_category

The class error_category serves as a base class for types used to identify the source and encoding of a particular category of error code. Classes may be derived from error_category to support categories of errors in addition to those defined in the C++ International Standard.

Public Functions

inline virtual ~error_category()

Destructor does nothing.

inline virtual const char *name() const = 0
Returns

A string naming the error category.

inline virtual error_condition default_error_condition(int ev) const
Returns

error_condition(ev, *this).

inline virtual bool equivalent(int code, const error_condition &condition) const
Returns

default_error_condition(code) == condition

inline virtual bool equivalent(const error_code &code, int condition) const
Returns

*this == code.category() && code.value() == condition

virtual std::string message(int ev) const = 0
Returns

A string that describes the error condition denoted by ev.

inline bool operator==(const error_category &rhs) const
Returns

*this == &rhs

inline bool operator!=(const error_category &rhs) const
Returns

!(*this == rhs)

inline bool operator<(const error_category &rhs) const

Note

less provides a total ordering for pointers.

Returns

less<const error_category*>()(this, &rhs)