diff --git a/include/uuid.h b/include/uuid.h index 69f587d..8661053 100644 --- a/include/uuid.h +++ b/include/uuid.h @@ -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 & operator<<(std::basic_ostream &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;