diff --git a/sprout/ctype/ascii.hpp b/sprout/ctype/ascii.hpp index cc39bdc1..80a317d0 100644 --- a/sprout/ctype/ascii.hpp +++ b/sprout/ctype/ascii.hpp @@ -231,11 +231,11 @@ namespace sprout { } \ inline SPROUT_CONSTEXPR CHAR_TYPE \ SPROUT_PP_CAT(to, SPROUT_PP_CAT(PREFIX, lower))(CHAR_TYPE c) { \ - return sprout::ascii::detail::get_value(c) & sprout::ascii::detail::lower ? c + (0x61 - 0x41) : c; \ + return sprout::ascii::detail::get_value(c) & sprout::ascii::detail::upper ? c + (0x61 - 0x41) : c; \ } \ inline SPROUT_CONSTEXPR CHAR_TYPE \ SPROUT_PP_CAT(to, SPROUT_PP_CAT(PREFIX, upper))(CHAR_TYPE c) { \ - return sprout::ascii::detail::get_value(c) & sprout::ascii::detail::upper ? c - (0x61 - 0x41) : c; \ + return sprout::ascii::detail::get_value(c) & sprout::ascii::detail::lower ? c - (0x61 - 0x41) : c; \ } \ inline SPROUT_CONSTEXPR bool \ SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, classified))(sprout::ctypes::mask_t m, CHAR_TYPE c) { \ diff --git a/sprout/ctype/functor.hpp b/sprout/ctype/functor.hpp index 50b73238..3591292c 100644 --- a/sprout/ctype/functor.hpp +++ b/sprout/ctype/functor.hpp @@ -4,6 +4,7 @@ #include #include #include +#include namespace sprout { namespace ctypes { @@ -402,6 +403,58 @@ namespace sprout { return sprout::ctypes::is_classified(m_)(x); } }; + + // + // nocase_equal_to + // + template + struct nocase_equal_to { + public: + typedef T first_argument_type; + typedef T second_argument_type; + typedef bool result_type; + public: + SPROUT_CONSTEXPR bool operator()(T const& x, T const& y) const { + return sprout::tolower(x) == sprout::tolower(y); + } + }; + template<> + struct nocase_equal_to { + public: + template + SPROUT_CONSTEXPR decltype(sprout::tolower(std::declval()) == sprout::tolower(std::declval())) + operator()(T&& x, U&& y) + const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::tolower(std::declval()) == sprout::tolower(std::declval()))) + { + return sprout::tolower(sprout::forward(x)) == sprout::tolower(sprout::forward(y)); + } + }; + + // + // nocase_not_equal_to + // + template + struct nocase_not_equal_to { + public: + typedef T first_argument_type; + typedef T second_argument_type; + typedef bool result_type; + public: + SPROUT_CONSTEXPR bool operator()(T const& x, T const& y) const { + return sprout::tolower(x) != sprout::tolower(y); + } + }; + template<> + struct nocase_not_equal_to { + public: + template + SPROUT_CONSTEXPR decltype(sprout::tolower(std::declval()) != sprout::tolower(std::declval())) + operator()(T&& x, U&& y) + const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::tolower(std::declval()) != sprout::tolower(std::declval()))) + { + return sprout::tolower(sprout::forward(x)) != sprout::tolower(sprout::forward(y)); + } + }; } // namespace ctypes } // namespace sprout diff --git a/sprout/uuid.hpp b/sprout/uuid.hpp index dbca076b..1730c640 100644 --- a/sprout/uuid.hpp +++ b/sprout/uuid.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #endif // #ifndef SPROUT_UUID_HPP diff --git a/sprout/uuid/md5_name_generator.hpp b/sprout/uuid/md5_name_generator.hpp index 1f5c7413..bd3a873c 100644 --- a/sprout/uuid/md5_name_generator.hpp +++ b/sprout/uuid/md5_name_generator.hpp @@ -4,6 +4,7 @@ #include #include #include +#include #include namespace sprout { @@ -66,6 +67,85 @@ namespace sprout { return sha_to_uuid(sum_.process_bytes(name, sprout::char_traits::length(name))); } }; + + // + // make_uuid3 + // + template + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid3(sprout::basic_string const& name) { + return sprout::uuids::md5_name_generator()(name); + } + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid3(char const* name) { + return sprout::uuids::md5_name_generator()(name); + } + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid3(wchar_t const* name) { + return sprout::uuids::md5_name_generator()(name); + } + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid3(char16_t const* name) { + return sprout::uuids::md5_name_generator()(name); + } + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid3(char32_t const* name) { + return sprout::uuids::md5_name_generator()(name); + } + + template + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid3(sprout::uuids::uuid const& namespace_uuid, sprout::basic_string const& name) { + return sprout::uuids::md5_name_generator(namespace_uuid)(name); + } + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid3(sprout::uuids::uuid const& namespace_uuid, char const* name) { + return sprout::uuids::md5_name_generator(namespace_uuid)(name); + } + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid3(sprout::uuids::uuid const& namespace_uuid, wchar_t const* name) { + return sprout::uuids::md5_name_generator(namespace_uuid)(name); + } + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid3(sprout::uuids::uuid const& namespace_uuid, char16_t const* name) { + return sprout::uuids::md5_name_generator(namespace_uuid)(name); + } + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid3(sprout::uuids::uuid const& namespace_uuid, char32_t const* name) { + return sprout::uuids::md5_name_generator(namespace_uuid)(name); + } + + inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator + make_uuid3() { + return sprout::uuids::md5_name_generator(); + } + inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator + make_uuid3(sprout::uuids::uuid const& namespace_uuid) { + return sprout::uuids::md5_name_generator(namespace_uuid); + } + + // + // make_uuid3_dns + // make_uuid3_url + // make_uuid3_oid + // make_uuid3_x500 + // + inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator + make_uuid3_dns() { + return sprout::uuids::md5_name_generator(sprout::uuids::namespace_dns_uuid()); + } + inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator + make_uuid3_url() { + return sprout::uuids::md5_name_generator(sprout::uuids::namespace_url_uuid()); + } + inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator + make_uuid3_oid() { + return sprout::uuids::md5_name_generator(sprout::uuids::namespace_oid_uuid()); + } + inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator + make_uuid3_x500() { + return sprout::uuids::md5_name_generator(sprout::uuids::namespace_x500_uuid()); + } } // namespace uuids } // namespace sprout diff --git a/sprout/uuid/namespaces.hpp b/sprout/uuid/namespaces.hpp new file mode 100644 index 00000000..48f15269 --- /dev/null +++ b/sprout/uuid/namespaces.hpp @@ -0,0 +1,64 @@ +#ifndef SPROUT_UUID_NAMESPACES_HPP +#define SPROUT_UUID_NAMESPACES_HPP + +#include +#include + +namespace sprout { + namespace uuids { + // + // namespace_dns_uuid + // + inline SPROUT_CONSTEXPR sprout::uuids::uuid + namespace_dns_uuid() { + return sprout::uuids::uuid{{ + 0x6b, 0xa7, 0xb8, 0x10, + 0x9d, 0xad, + 0x11, 0xd1, + 0x80, 0xb4, + 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8 + }}; + } + // + // namespace_url_uuid + // + inline SPROUT_CONSTEXPR sprout::uuids::uuid + namespace_url_uuid() { + return sprout::uuids::uuid{{ + 0x6b, 0xa7, 0xb8, 0x11, + 0x9d, 0xad, + 0x11, 0xd1, + 0x80, 0xb4, + 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8 + }}; + } + // + // namespace_oid_uuid + // + inline SPROUT_CONSTEXPR sprout::uuids::uuid + namespace_oid_uuid() { + return sprout::uuids::uuid{{ + 0x6b, 0xa7, 0xb8, 0x12, + 0x9d, 0xad, + 0x11, 0xd1, + 0x80, 0xb4, + 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8 + }}; + } + // + // namespace_x500_uuid + // + inline SPROUT_CONSTEXPR sprout::uuids::uuid + namespace_x500_uuid() { + return sprout::uuids::uuid{{ + 0x6b, 0xa7, 0xb8, 0x14, + 0x9d, 0xad, + 0x11, 0xd1, + 0x80, 0xb4, + 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8 + }}; + } + } // namespace uuids +} // namespace sprout + +#endif // #ifndef SPROUT_UUID_NAMESPACES_HPP diff --git a/sprout/uuid/nil_generator.hpp b/sprout/uuid/nil_generator.hpp index 29b6d89d..33fbc98b 100644 --- a/sprout/uuid/nil_generator.hpp +++ b/sprout/uuid/nil_generator.hpp @@ -17,6 +17,7 @@ namespace sprout { return result_type{{0}}; } }; + // // nil_uuid // diff --git a/sprout/uuid/random_generator.hpp b/sprout/uuid/random_generator.hpp index 997326b9..f8b07b96 100644 --- a/sprout/uuid/random_generator.hpp +++ b/sprout/uuid/random_generator.hpp @@ -15,7 +15,7 @@ namespace sprout { // // basic_random_generator // - template + template class basic_random_generator { public: typedef sprout::uuids::uuid result_type; @@ -68,14 +68,16 @@ namespace sprout { SPROUT_CONSTEXPR typename std::enable_if< std::is_integral::value, result_type - >::type operator()(T const& seed) const { + >::type + operator()(T const& seed) const { return operator()(engine_type(seed)); } template SPROUT_CONSTEXPR typename std::enable_if< !std::is_integral::value, result_type - >::type operator()(Engine const& engine) const { + >::type + operator()(Engine const& engine) const { return random_to_uuid(sprout::random::combine(engine, distribution_)()); } }; @@ -83,7 +85,27 @@ namespace sprout { // // random_generator // - typedef sprout::uuids::basic_random_generator random_generator; + typedef sprout::uuids::basic_random_generator<> random_generator; + + // + // make_uuid4 + // + template + SPROUT_CONSTEXPR typename std::enable_if< + std::is_integral::value, + sprout::uuids::uuid + >::type + make_uuid4(T const& seed) { + return sprout::uuids::random_generator()(seed); + } + template + SPROUT_CONSTEXPR typename std::enable_if< + !std::is_integral::value, + sprout::uuids::uuid + >::type + make_uuid4(Engine const& engine) { + return sprout::uuids::random_generator()(engine); + } } // namespace uuids } // namespace sprout diff --git a/sprout/uuid/sha1_name_generator.hpp b/sprout/uuid/sha1_name_generator.hpp index 6d1e375d..eeb692d5 100644 --- a/sprout/uuid/sha1_name_generator.hpp +++ b/sprout/uuid/sha1_name_generator.hpp @@ -4,6 +4,7 @@ #include #include #include +#include #include namespace sprout { @@ -66,6 +67,85 @@ namespace sprout { return sha_to_uuid(sum_.process_bytes(name, sprout::char_traits::length(name))); } }; + + // + // make_uuid5 + // + template + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid5(sprout::basic_string const& name) { + return sprout::uuids::sha1_name_generator()(name); + } + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid5(char const* name) { + return sprout::uuids::sha1_name_generator()(name); + } + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid5(wchar_t const* name) { + return sprout::uuids::sha1_name_generator()(name); + } + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid5(char16_t const* name) { + return sprout::uuids::sha1_name_generator()(name); + } + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid5(char32_t const* name) { + return sprout::uuids::sha1_name_generator()(name); + } + + template + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid5(sprout::uuids::uuid const& namespace_uuid, sprout::basic_string const& name) { + return sprout::uuids::sha1_name_generator(namespace_uuid)(name); + } + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid5(sprout::uuids::uuid const& namespace_uuid, char const* name) { + return sprout::uuids::sha1_name_generator(namespace_uuid)(name); + } + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid5(sprout::uuids::uuid const& namespace_uuid, wchar_t const* name) { + return sprout::uuids::sha1_name_generator(namespace_uuid)(name); + } + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid5(sprout::uuids::uuid const& namespace_uuid, char16_t const* name) { + return sprout::uuids::sha1_name_generator(namespace_uuid)(name); + } + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid5(sprout::uuids::uuid const& namespace_uuid, char32_t const* name) { + return sprout::uuids::sha1_name_generator(namespace_uuid)(name); + } + + inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator + make_uuid5() { + return sprout::uuids::sha1_name_generator(); + } + inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator + make_uuid5(sprout::uuids::uuid const& namespace_uuid) { + return sprout::uuids::sha1_name_generator(namespace_uuid); + } + + // + // make_uuid5_dns + // make_uuid5_url + // make_uuid5_oid + // make_uuid5_x500 + // + inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator + make_uuid5_dns() { + return sprout::uuids::sha1_name_generator(sprout::uuids::namespace_dns_uuid()); + } + inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator + make_uuid5_url() { + return sprout::uuids::sha1_name_generator(sprout::uuids::namespace_url_uuid()); + } + inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator + make_uuid5_oid() { + return sprout::uuids::sha1_name_generator(sprout::uuids::namespace_oid_uuid()); + } + inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator + make_uuid5_x500() { + return sprout::uuids::sha1_name_generator(sprout::uuids::namespace_x500_uuid()); + } } // namespace uuids } // namespace sprout diff --git a/sprout/uuid/string_generator.hpp b/sprout/uuid/string_generator.hpp index bee1f33c..94126318 100644 --- a/sprout/uuid/string_generator.hpp +++ b/sprout/uuid/string_generator.hpp @@ -197,6 +197,36 @@ namespace sprout { return operator()(s, s + sprout::char_traits::length(s)); } }; + + // + // make_uuid + // + template + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid(Iterator first, Iterator last) { + return sprout::uuids::string_generator()(first, last); + } + template + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid(sprout::basic_string const& s) { + return sprout::uuids::string_generator()(s); + } + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid(char const* s) { + return sprout::uuids::string_generator()(s); + } + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid(wchar_t const* s) { + return sprout::uuids::string_generator()(s); + } + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid(char16_t const* s) { + return sprout::uuids::string_generator()(s); + } + inline SPROUT_CONSTEXPR sprout::uuids::uuid + make_uuid(char32_t const* s) { + return sprout::uuids::string_generator()(s); + } } // namespace uuids } // namespace sprout diff --git a/sprout/uuid/udl.hpp b/sprout/uuid/udl.hpp index 800d9c1f..b91c801c 100644 --- a/sprout/uuid/udl.hpp +++ b/sprout/uuid/udl.hpp @@ -7,44 +7,224 @@ #if SPROUT_USE_USER_DEFINED_LITERALS #include +#include +#include #include +#include +#include +#include +#include +#include +#include namespace sprout { namespace uuids { + namespace detail { + template + inline SPROUT_CONSTEXPR sprout::basic_string + dns_token(); + template<> + inline SPROUT_CONSTEXPR sprout::basic_string + dns_token() { + return sprout::to_string("dns"); + } + template<> + inline SPROUT_CONSTEXPR sprout::basic_string + dns_token() { + return sprout::to_string(L"dns"); + } + template<> + inline SPROUT_CONSTEXPR sprout::basic_string + dns_token() { + return sprout::to_string(u"dns"); + } + template<> + inline SPROUT_CONSTEXPR sprout::basic_string + dns_token() { + return sprout::to_string(U"dns"); + } + + template + inline SPROUT_CONSTEXPR sprout::basic_string + url_token(); + template<> + inline SPROUT_CONSTEXPR sprout::basic_string + url_token() { + return sprout::to_string("url"); + } + template<> + inline SPROUT_CONSTEXPR sprout::basic_string + url_token() { + return sprout::to_string(L"url"); + } + template<> + inline SPROUT_CONSTEXPR sprout::basic_string + url_token() { + return sprout::to_string(u"url"); + } + template<> + inline SPROUT_CONSTEXPR sprout::basic_string + url_token() { + return sprout::to_string(U"url"); + } + + template + inline SPROUT_CONSTEXPR sprout::basic_string + oid_token(); + template<> + inline SPROUT_CONSTEXPR sprout::basic_string + oid_token() { + return sprout::to_string("oid"); + } + template<> + inline SPROUT_CONSTEXPR sprout::basic_string + oid_token() { + return sprout::to_string(L"oid"); + } + template<> + inline SPROUT_CONSTEXPR sprout::basic_string + oid_token() { + return sprout::to_string(u"oid"); + } + template<> + inline SPROUT_CONSTEXPR sprout::basic_string + oid_token() { + return sprout::to_string(U"oid"); + } + + template + inline SPROUT_CONSTEXPR sprout::basic_string + x500_token(); + template<> + inline SPROUT_CONSTEXPR sprout::basic_string + x500_token() { + return sprout::to_string("x500"); + } + template<> + inline SPROUT_CONSTEXPR sprout::basic_string + x500_token() { + return sprout::to_string(L"x500"); + } + template<> + inline SPROUT_CONSTEXPR sprout::basic_string + x500_token() { + return sprout::to_string(u"x500"); + } + template<> + inline SPROUT_CONSTEXPR sprout::basic_string + x500_token() { + return sprout::to_string(U"x500"); + } + + template + inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator + uuid3_impl(Range const& rng) { + typedef typename std::decay::type>::type value_type; + typedef sprout::ctypes::nocase_equal_to predicate_type; + return sprout::range::equal(rng, sprout::uuids::detail::dns_token(), predicate_type()) ? sprout::uuids::make_uuid3_dns() + : sprout::range::equal(rng, sprout::uuids::detail::url_token(), predicate_type()) ? sprout::uuids::make_uuid3_url() + : sprout::range::equal(rng, sprout::uuids::detail::oid_token(), predicate_type()) ? sprout::uuids::make_uuid3_oid() + : sprout::range::equal(rng, sprout::uuids::detail::x500_token(), predicate_type()) ? sprout::uuids::make_uuid3_x500() + : sprout::uuids::make_uuid3(sprout::uuids::make_uuid(sprout::begin(rng), sprout::end(rng))) + ; + } + + template + inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator + uuid5_impl(Range const& rng) { + typedef typename std::decay::type>::type value_type; + typedef sprout::ctypes::nocase_equal_to predicate_type; + return sprout::range::equal(rng, sprout::uuids::detail::dns_token(), predicate_type()) ? sprout::uuids::make_uuid5_dns() + : sprout::range::equal(rng, sprout::uuids::detail::url_token(), predicate_type()) ? sprout::uuids::make_uuid5_url() + : sprout::range::equal(rng, sprout::uuids::detail::oid_token(), predicate_type()) ? sprout::uuids::make_uuid5_oid() + : sprout::range::equal(rng, sprout::uuids::detail::x500_token(), predicate_type()) ? sprout::uuids::make_uuid5_x500() + : sprout::uuids::make_uuid5(sprout::uuids::make_uuid(sprout::begin(rng), sprout::end(rng))) + ; + } + } // namespace detail + namespace udl { // // _uuid // inline SPROUT_CONSTEXPR sprout::uuids::uuid operator"" _uuid(char const* s, std::size_t size) { - return sprout::uuids::string_generator()(s, s + size); + return sprout::uuids::make_uuid(s, s + size); } inline SPROUT_CONSTEXPR sprout::uuids::uuid operator"" _uuid(wchar_t const* s, std::size_t size) { - return sprout::uuids::string_generator()(s, s + size); + return sprout::uuids::make_uuid(s, s + size); } inline SPROUT_CONSTEXPR sprout::uuids::uuid operator"" _uuid(char16_t const* s, std::size_t size) { - return sprout::uuids::string_generator()(s, s + size); + return sprout::uuids::make_uuid(s, s + size); } inline SPROUT_CONSTEXPR sprout::uuids::uuid operator"" _uuid(char32_t const* s, std::size_t size) { - return sprout::uuids::string_generator()(s, s + size); + return sprout::uuids::make_uuid(s, s + size); + } + + // + // _uuid3 + // + inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator + operator"" _uuid3(char const* s, std::size_t size) { + return sprout::uuids::detail::uuid3_impl(sprout::range::make_ptr_range(s, size)); + } + inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator + operator"" _uuid3(wchar_t const* s, std::size_t size) { + return sprout::uuids::detail::uuid3_impl(sprout::range::make_ptr_range(s, size)); + } + inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator + operator"" _uuid3(char16_t const* s, std::size_t size) { + return sprout::uuids::detail::uuid3_impl(sprout::range::make_ptr_range(s, size)); + } + inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator + operator"" _uuid3(char32_t const* s, std::size_t size) { + return sprout::uuids::detail::uuid3_impl(sprout::range::make_ptr_range(s, size)); + } + + // + // _uuid5 + // + inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator + operator"" _uuid5(char const* s, std::size_t size) { + return sprout::uuids::detail::uuid5_impl(sprout::range::make_ptr_range(s, size)); + } + inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator + operator"" _uuid5(wchar_t const* s, std::size_t size) { + return sprout::uuids::detail::uuid5_impl(sprout::range::make_ptr_range(s, size)); + } + inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator + operator"" _uuid5(char16_t const* s, std::size_t size) { + return sprout::uuids::detail::uuid5_impl(sprout::range::make_ptr_range(s, size)); + } + inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator + operator"" _uuid5(char32_t const* s, std::size_t size) { + return sprout::uuids::detail::uuid5_impl(sprout::range::make_ptr_range(s, size)); } } // namespace udl using sprout::uuids::udl::operator"" _uuid; + using sprout::uuids::udl::operator"" _uuid3; + using sprout::uuids::udl::operator"" _uuid5; } // namespace uuids namespace udl { namespace uuids { using sprout::uuids::udl::operator"" _uuid; + using sprout::uuids::udl::operator"" _uuid3; + using sprout::uuids::udl::operator"" _uuid5; } // namespace uuids using sprout::uuids::udl::operator"" _uuid; + using sprout::uuids::udl::operator"" _uuid3; + using sprout::uuids::udl::operator"" _uuid5; } // namespace udl using sprout::uuids::udl::operator"" _uuid; + using sprout::uuids::udl::operator"" _uuid3; + using sprout::uuids::udl::operator"" _uuid5; } // namespace sprout #endif // #if SPROUT_USE_USER_DEFINED_LITERALS