mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
add user-defined literals _uuid3, _uuid5
This commit is contained in:
parent
94b146b5cc
commit
35e651d144
10 changed files with 521 additions and 10 deletions
|
@ -197,6 +197,36 @@ namespace sprout {
|
|||
return operator()(s, s + sprout::char_traits<char32_t>::length(s));
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// make_uuid
|
||||
//
|
||||
template<typename Iterator>
|
||||
inline SPROUT_CONSTEXPR sprout::uuids::uuid
|
||||
make_uuid(Iterator first, Iterator last) {
|
||||
return sprout::uuids::string_generator()(first, last);
|
||||
}
|
||||
template<typename Elem, std::size_t N, typename Traits>
|
||||
inline SPROUT_CONSTEXPR sprout::uuids::uuid
|
||||
make_uuid(sprout::basic_string<Elem, N, Traits> 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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue