diff --git a/.gitignore b/.gitignore index 163cb64..fd4e108 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,5 @@ *.app /build/.gitignore -build \ No newline at end of file +build +/test/CMakeFiles/3.10.0/CompilerIdC/Debug/CompilerIdC.tlog diff --git a/P0959.md b/P0959.md index 845a7f6..ba00150 100644 --- a/P0959.md +++ b/P0959.md @@ -468,12 +468,12 @@ namespace std { static bool is_valid_uuid(std::basic_string const & str) noexcept; template - static uuid from_string(CharT const * str); + static uuid from_string(CharT const * str) noexcept; template, class Allocator = std::allocator> - static uuid from_string(std::basic_string const & str); + static uuid from_string(std::basic_string const & str) noexcept; private: template friend std::basic_ostream & operator<<(std::basic_ostream &s, uuid const & id); @@ -485,7 +485,7 @@ namespace std { ```cpp namespace std { - inline constexpr void swap(uuid & lhs, uuid & rhs); + inline constexpr void swap(uuid & lhs, uuid & rhs) noexcept; template std::basic_ostream & operator<<(std::basic_ostream &s, uuid const & id); @@ -493,7 +493,7 @@ namespace std { template, class Allocator = std::allocator> - inline std::string to_string(uuid const & id); + inline std::basic_string to_string(uuid const & id); } ``` @@ -622,12 +622,12 @@ namespace std { static bool is_valid_uuid(std::basic_string const & str) noexcept; template - static uuid from_string(CharT const * str); + static uuid from_string(CharT const * str) noexcept; template, class Allocator = std::allocator> - static uuid from_string(std::basic_string const & str); + static uuid from_string(std::basic_string const & str) noexcept; private: template friend std::basic_ostream & operator<<(std::basic_ostream &s, uuid const & id); diff --git a/include/uuid.h b/include/uuid.h index 5b42520..2b64fae 100644 --- a/include/uuid.h +++ b/include/uuid.h @@ -304,11 +304,11 @@ namespace uuids name_based_sha1 = 5 // The name-based version specified in RFS 4122 with SHA1 hashing }; - struct uuid + class uuid { + public: using value_type = uint8_t; - public: constexpr uuid() noexcept : data({}) {}; explicit uuid(gsl::span bytes) @@ -544,7 +544,7 @@ namespace uuids return sstr.str(); } - inline void swap(uuids::uuid & lhs, uuids::uuid & rhs) + inline void swap(uuids::uuid & lhs, uuids::uuid & rhs) noexcept { lhs.swap(rhs); }