Header file errored_status_code.hpp

#include "quick_status_code_from_enum.hpp"

#include "status_code_ptr.hpp"

namespace system_error2
{
    template <class DomainType>
    class errored_status_code;

    namespace traits
    {
        template <class DomainType>
        struct is_move_bitcopying<errored_status_code<DomainType>;
    }

    namespace traits
    {
    }

    template <class DomainType1, class DomainType2>
    bool operator==(errored_status_code<DomainType1> const& a, errored_status_code<DomainType2> const& b) noexcept;

    template <class DomainType1, class DomainType2>
    bool operator==(status_code<DomainType1> const& a, errored_status_code<DomainType2> const& b) noexcept;

    template <class DomainType1, class DomainType2>
    bool operator==(errored_status_code<DomainType1> const& a, status_code<DomainType2> const& b) noexcept;

    template <class DomainType1, class DomainType2>
    bool operator!=(errored_status_code<DomainType1> const& a, errored_status_code<DomainType2> const& b) noexcept;

    template <class DomainType1, class DomainType2>
    bool operator!=(status_code<DomainType1> const& a, errored_status_code<DomainType2> const& b) noexcept;

    template <class DomainType1, class DomainType2>
    bool operator!=(errored_status_code<DomainType1> const& a, status_code<DomainType2> const& b) noexcept;

    template <class DomainType1, class T, class MakeStatusCodeResult = typename detail::safe_get_make_status_code_result<const T&>::type
}

Class system_error2::errored_status_code

template <class DomainType>
class errored_status_code
: public status_code<DomainType>
{
public:
    errored_status_code() = default;

    errored_status_code(const errored_status_code<DomainType>&) = default;

    errored_status_code(errored_status_code<DomainType>&&) = default;

    errored_status_code<DomainType>& operator=(const errored_status_code<DomainType>&) = default;

    errored_status_code<DomainType>& operator=(errored_status_code<DomainType>&&) = default;

    ~errored_status_code() = default;

    explicit errored_status_code('hidden' const& o) noexcept(std::is_nothrow_copy_constructible<_base>::value);

    explicit errored_status_code('hidden'&& o) noexcept(std::is_nothrow_move_constructible<_base>::value);
};

A status_code which is always a failure. The closest equivalent to std::error_code, except it cannot be modified, and is templated.

Differences from status_code:

Constructor system_error2::errored_status_code::errored_status_code

errored_status_code() = default;

Default constructor.


Constructor system_error2::errored_status_code::errored_status_code

errored_status_code(const errored_status_code<DomainType>&) = default;

Copy constructor.


Constructor system_error2::errored_status_code::errored_status_code

errored_status_code(errored_status_code<DomainType>&&) = default;

Move constructor.


Function system_error2::errored_status_code::operator=

errored_status_code<DomainType>& operator=(const errored_status_code<DomainType>&) = default;

Copy assignment.


Function system_error2::errored_status_code::operator=

errored_status_code<DomainType>& operator=(errored_status_code<DomainType>&&) = default;

Move assignment.


Constructor system_error2::errored_status_code::errored_status_code

explicit errored_status_code('hidden' const& o) noexcept(std::is_nothrow_copy_constructible<_base>::value);

Explicitly construct from any similarly erased status code


Constructor system_error2::errored_status_code::errored_status_code

explicit errored_status_code('hidden'&& o) noexcept(std::is_nothrow_move_constructible<_base>::value);

Explicitly construct from any similarly erased status code



Function system_error2::operator==

template <class DomainType1, class DomainType2>
bool operator==(errored_status_code<DomainType1> const& a, errored_status_code<DomainType2> const& b) noexcept;

True if the status code’s are semantically equal via equivalent().


Function system_error2::operator==

template <class DomainType1, class DomainType2>
bool operator==(status_code<DomainType1> const& a, errored_status_code<DomainType2> const& b) noexcept;

True if the status code’s are semantically equal via equivalent().


Function system_error2::operator==

template <class DomainType1, class DomainType2>
bool operator==(errored_status_code<DomainType1> const& a, status_code<DomainType2> const& b) noexcept;

True if the status code’s are semantically equal via equivalent().


Function system_error2::operator!=

template <class DomainType1, class DomainType2>
bool operator!=(errored_status_code<DomainType1> const& a, errored_status_code<DomainType2> const& b) noexcept;

True if the status code’s are not semantically equal via equivalent().


Function system_error2::operator!=

template <class DomainType1, class DomainType2>
bool operator!=(status_code<DomainType1> const& a, errored_status_code<DomainType2> const& b) noexcept;

True if the status code’s are not semantically equal via equivalent().


Function system_error2::operator!=

template <class DomainType1, class DomainType2>
bool operator!=(errored_status_code<DomainType1> const& a, status_code<DomainType2> const& b) noexcept;

True if the status code’s are not semantically equal via equivalent().


Unexposed entity system_error2::type

template <class DomainType1, class T, class MakeStatusCodeResult = typename detail::safe_get_make_status_code_result<const T&>::type

True if the status code’s are semantically equal via equivalent() to make_status_code(T).