Merge pull request #53 from kcsaul/master

Fix operator<< compiler error when c++20 enabled
This commit is contained in:
Marius Bancila 2021-12-30 12:16:56 +02:00 committed by GitHub
commit 9357e5280c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -550,13 +550,6 @@ namespace uuids
return lhs.data < rhs.data; return lhs.data < rhs.data;
} }
template <class Elem, class Traits>
std::basic_ostream<Elem, Traits> & operator<<(std::basic_ostream<Elem, Traits> &s, uuid const & id)
{
s << to_string(id);
return s;
}
template<class CharT = char, template<class CharT = char,
class Traits = std::char_traits<CharT>, class Traits = std::char_traits<CharT>,
class Allocator = std::allocator<CharT>> class Allocator = std::allocator<CharT>>
@ -578,6 +571,13 @@ namespace uuids
return uustr; return uustr;
} }
template <class Elem, class Traits>
std::basic_ostream<Elem, Traits>& operator<<(std::basic_ostream<Elem, Traits>& s, uuid const& id)
{
s << to_string(id);
return s;
}
inline void swap(uuids::uuid & lhs, uuids::uuid & rhs) noexcept inline void swap(uuids::uuid & lhs, uuids::uuid & rhs) noexcept
{ {
lhs.swap(rhs); lhs.swap(rhs);