2012-03-18 13:04:09 +00:00
|
|
|
#ifndef SPROUT_UUID_UDL_HPP
|
|
|
|
#define SPROUT_UUID_UDL_HPP
|
|
|
|
|
|
|
|
#include <sprout/config.hpp>
|
|
|
|
#include <sprout/uuid/uuid.hpp>
|
|
|
|
|
|
|
|
#if SPROUT_USE_USER_DEFINED_LITERALS
|
|
|
|
|
|
|
|
#include <cstddef>
|
|
|
|
#include <sprout/uuid/string_generator.hpp>
|
|
|
|
|
|
|
|
namespace sprout {
|
|
|
|
namespace uuids {
|
|
|
|
namespace udl {
|
|
|
|
//
|
|
|
|
// _uuid
|
|
|
|
//
|
2012-10-05 15:58:56 +00:00
|
|
|
inline SPROUT_CONSTEXPR sprout::uuids::uuid
|
2013-04-14 07:51:19 +00:00
|
|
|
operator"" _uuid(char const* s, std::size_t size) {
|
2012-03-19 05:16:33 +00:00
|
|
|
return sprout::uuids::string_generator()(s, s + size);
|
2012-03-18 13:04:09 +00:00
|
|
|
}
|
2012-10-05 15:58:56 +00:00
|
|
|
inline SPROUT_CONSTEXPR sprout::uuids::uuid
|
2013-04-14 07:51:19 +00:00
|
|
|
operator"" _uuid(wchar_t const* s, std::size_t size) {
|
2012-03-19 05:16:33 +00:00
|
|
|
return sprout::uuids::string_generator()(s, s + size);
|
2012-03-18 13:04:09 +00:00
|
|
|
}
|
2012-10-05 15:58:56 +00:00
|
|
|
inline SPROUT_CONSTEXPR sprout::uuids::uuid
|
2013-04-14 07:51:19 +00:00
|
|
|
operator"" _uuid(char16_t const* s, std::size_t size) {
|
2012-03-19 05:16:33 +00:00
|
|
|
return sprout::uuids::string_generator()(s, s + size);
|
2012-03-18 13:04:09 +00:00
|
|
|
}
|
2012-10-05 15:58:56 +00:00
|
|
|
inline SPROUT_CONSTEXPR sprout::uuids::uuid
|
2013-04-14 07:51:19 +00:00
|
|
|
operator"" _uuid(char32_t const* s, std::size_t size) {
|
2012-03-19 05:16:33 +00:00
|
|
|
return sprout::uuids::string_generator()(s, s + size);
|
2012-03-18 13:04:09 +00:00
|
|
|
}
|
2013-04-14 07:51:19 +00:00
|
|
|
} // namespace udl
|
|
|
|
|
|
|
|
using sprout::uuids::udl::operator"" _uuid;
|
|
|
|
} // namespace uuids
|
|
|
|
|
|
|
|
namespace udl {
|
|
|
|
namespace uuids {
|
|
|
|
using sprout::uuids::udl::operator"" _uuid;
|
2012-03-18 13:04:09 +00:00
|
|
|
} // namespace uuids
|
|
|
|
|
2013-04-14 07:51:19 +00:00
|
|
|
using sprout::uuids::udl::operator"" _uuid;
|
2012-03-18 13:04:09 +00:00
|
|
|
} // namespace udl
|
|
|
|
|
2013-04-14 07:51:19 +00:00
|
|
|
using sprout::uuids::udl::operator"" _uuid;
|
2012-03-18 13:04:09 +00:00
|
|
|
} // namespace sprout
|
|
|
|
|
|
|
|
#endif // #if SPROUT_USE_USER_DEFINED_LITERALS
|
|
|
|
|
|
|
|
#endif // #ifndef SPROUT_UUID_UDL_HPP
|