Class thrust::system::error_code
#include <thrust/system/error_code.h>
class thrust::system::error_code { public: error_code();
error_code(int val, const error_category & cat);
template <typename ErrorCodeEnum> error_code(ErrorCodeEnum e, typename thrust::detail::enable_if< is_error_code_enum< ErrorCodeEnum >::value >::type * = 0);
void assign(int val, const error_category & cat);
template <typename ErrorCodeEnum> thrust::detail::enable_if< is_error_code_enum< ErrorCodeEnum >::value, error_code >::type & operator=(ErrorCodeEnum e);
void clear();
int value() const;
const error_category & category() const;
error_condition default_error_condition() const;
std::string message() const;
operator bool() const; };
Member Functions
Function thrust::system::error_code::error_code
error_code();
Effects: Constructs an object of type error_code
.
Postconditions: value() == 0
and category() == &system_category()
.
Function thrust::system::error_code::error_code
error_code(int val, const error_category & cat);
Effects: Constructs an object of type error_code
.
Postconditions: value() == val
and category() == &cat
.
Function thrust::system::error_code::error_code
template <typename ErrorCodeEnum> error_code(ErrorCodeEnum e, typename thrust::detail::enable_if< is_error_code_enum< ErrorCodeEnum >::value >::type * = 0);
Effects: Constructs an object of type error_code
.
Postconditions: *this == make_error_code(e)
.
Function thrust::system::error_code::assign
void assign(int val, const error_category & cat);
Postconditions: value() == val
and category() == &cat
.
Function thrust::system::error_code::operator=
template <typename ErrorCodeEnum> thrust::detail::enable_if< is_error_code_enum< ErrorCodeEnum >::value, error_code >::type & operator=(ErrorCodeEnum e);
Postconditions: *this == make_error_code(e)
.
Function thrust::system::error_code::clear
void clear();
Postconditions: value() == 0
and category() == system_category()
.
Function thrust::system::error_code::value
int value() const;
Returns: An integral value of this error_code
object.
Function thrust::system::error_code::category
const error_category & category() const;
Returns: An error_category
describing the category of this error_code
object.
Function thrust::system::error_code::default_error_condition
error_condition default_error_condition() const;
Returns: category().default_error_condition()
.
Function thrust::system::error_code::message
std::string message() const;
Returns: category().message(value())
.
Function thrust::system::error_code::operator bool
operator bool() const;
Returns: value() != 0
.