From adb24b3d9d0369387b93f5112146dec12769514b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sun, 5 Aug 2018 00:01:20 +0200 Subject: [PATCH] Ensure structs get defined in correct order uuid_version tried to use (yet) unknown uuid_error. Reorder their definitions to address this issue. --- include/uuid.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) 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;