status_error.hpp
#include "status_code.hpp"
namespace system_error2
{
template <class DomainType>
class status_error;
template <>
class status_error<void>;
template <class DomainType>
class status_error;
}
system_error2::status_error
template <class DomainType>
class status_error;
Exception type representing a thrown status_code
system_error2::status_error
template <>
class status_error<void>
: public std::exception
{
protected:
status_error() = default;
status_error(system_error2::status_error<void> const&) = default;
status_error(system_error2::status_error<void>&&) = default;
system_error2::status_error<void>& operator=(system_error2::status_error<void> const&) = default;
system_error2::status_error<void>& operator=(system_error2::status_error<void>&&) = default;
virtual ~status_error() = default;
public:
using domain_type = void;
using status_code_type = status_code<void>;
};
The erased type edition of status_error.
system_error2::status_error::status_error
status_error() = default;
Constructs an instance. Not publicly available.
system_error2::status_error::status_error
status_error(system_error2::status_error<void> const&) = default;
Copy constructor. Not publicly available
system_error2::status_error::status_error
status_error(system_error2::status_error<void>&&) = default;
Move constructor. Not publicly available
system_error2::status_error::operator=
system_error2::status_error<void>& operator=(system_error2::status_error<void> const&) = default;
Copy assignment. Not publicly available
system_error2::status_error::operator=
system_error2::status_error<void>& operator=(system_error2::status_error<void>&&) = default;
Move assignment. Not publicly available
system_error2::status_error::~status_error
virtual ~status_error() = default;
Destructor. Not publicly available.
system_error2::status_error::domain_type
using domain_type = void;
The type of the status domain
system_error2::status_error::status_code_type
using status_code_type = status_code<void>;
The type of the status code
system_error2::status_error
template <class DomainType>
class status_error
: public status_error<void>
{
public:
using domain_type = DomainType;
using status_code_type = status_code<DomainType>;
explicit status_error(status_code<DomainType> code);
virtual char const* what() const noexcept;
status_code_type& code() const &;
status_code_type& code() &;
status_code_type&& code() const &&;
status_code_type&& code() &&;
};
Exception type representing a thrown status_code
system_error2::status_error::domain_type
using domain_type = DomainType;
The type of the status domain
system_error2::status_error::status_code_type
using status_code_type = status_code<DomainType>;
The type of the status code
system_error2::status_error::status_error
explicit status_error(status_code<DomainType> code);
Constructs an instance
system_error2::status_error::what
virtual char const* what() const noexcept;
Return an explanatory string
system_error2::status_error::code
status_code_type& code() const &;
Returns a reference to the code
system_error2::status_error::code
status_code_type& code() &;
Returns a reference to the code
system_error2::status_error::code
status_code_type&& code() const &&;
Returns a reference to the code
system_error2::status_error::code
status_code_type&& code() &&;
Returns a reference to the code