config.hpp
#define SYSTEM_ERROR2_CONSTEXPR14
#define SYSTEM_ERROR2_NORETURN
#define SYSTEM_ERROR2_NODISCARD
#define SYSTEM_ERROR2_TRIVIAL_ABI
#define SYSTEM_ERROR2_NAMESPACE
#define SYSTEM_ERROR2_NAMESPACE_BEGIN
#define SYSTEM_ERROR2_NAMESPACE_END
namespace system_error2
{
namespace traits
{
template <class T>
struct is_move_bitcopying;
}
}
namespace system_error2
{
}
#define SYSTEM_ERROR2_FATAL(msg)
SYSTEM_ERROR2_CONSTEXPR14
#define SYSTEM_ERROR2_CONSTEXPR14
Defined to be constexpr
when on C++ 14 or better compilers. Usually automatic, can be overriden.
SYSTEM_ERROR2_TRIVIAL_ABI
#define SYSTEM_ERROR2_TRIVIAL_ABI
Defined to be [[clang::trivial_abi]]
when on a new enough clang compiler. Usually automatic, can be overriden.
SYSTEM_ERROR2_NAMESPACE
#define SYSTEM_ERROR2_NAMESPACE
The system_error2 namespace name.
SYSTEM_ERROR2_NAMESPACE_BEGIN
#define SYSTEM_ERROR2_NAMESPACE_BEGIN
Begins the system_error2 namespace.
SYSTEM_ERROR2_NAMESPACE_END
#define SYSTEM_ERROR2_NAMESPACE_END
Ends the system_error2 namespace.
system_error2::traits::is_move_bitcopying
template <class T>
struct is_move_bitcopying
{
static constexpr bool const value;
};
Specialise to true if you guarantee that a type is move bitcopying (i.e.
its move constructor equals copying bits from old to new, old is left in a default constructed state, and calling the destructor on a default constructed instance is trivial). All trivially copyable types are move bitcopying by definition, and that is the unspecialised implementation.
SYSTEM_ERROR2_FATAL
#define SYSTEM_ERROR2_FATAL(msg)
Prints msg to stderr, and calls std::terminate()
. Can be overriden via predefinition.