Ensure structs get defined in correct order

uuid_version tried to use (yet) unknown uuid_error. Reorder their
definitions to address this issue.
This commit is contained in:
Michał Janiszewski 2018-08-05 00:01:20 +02:00
parent 2e07420571
commit adb24b3d9d

View File

@ -283,6 +283,19 @@ namespace uuids
reserved
};
struct uuid_error : public std::runtime_error
{
explicit uuid_error(std::string_view message)
: std::runtime_error(message.data())
{
}
explicit uuid_error(char const * message)
: std::runtime_error(message)
{
}
};
// indicated by a bit pattern in octet 6, marked with M in xxxxxxxx-xxxx-Mxxx-xxxx-xxxxxxxxxxxx
enum class uuid_version
{
@ -573,19 +586,6 @@ namespace uuids
friend std::basic_ostream<Elem, Traits> & operator<<(std::basic_ostream<Elem, Traits> &s, uuid const & id);
};
struct uuid_error : public std::runtime_error
{
explicit uuid_error(std::string_view message)
: std::runtime_error(message.data())
{
}
explicit uuid_error(char const * message)
: std::runtime_error(message)
{
}
};
inline bool operator== (uuid const& lhs, uuid const& rhs) noexcept
{
return lhs.data == rhs.data;