thrust::system::error_category#

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

virtual ~error_category()#

Destructor does nothing.

virtual const char *name() const = 0#
Returns:

A string naming the error category.

virtual error_condition default_error_condition(int ev) const#
Returns:

error_condition(ev, *this).

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

default_error_condition(code) == condition

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.

bool operator==(const error_category &rhs) const#
Returns:

*this == &rhs

bool operator!=(const error_category &rhs) const#
Returns:

!(*this == rhs)

bool operator<(const error_category &rhs) const#

Note

less provides a total ordering for pointers.

Returns:

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