diff --git a/sprout/config/config.hpp b/sprout/config/config.hpp index 86805350..b29a8dd2 100644 --- a/sprout/config/config.hpp +++ b/sprout/config/config.hpp @@ -8,6 +8,10 @@ #ifndef SPROUT_CONFIG_CONFIG_HPP #define SPROUT_CONFIG_CONFIG_HPP +#ifndef SPROUT_CONFIG_DISABLE_USER_CONFIG +# include +#endif // #ifndef SPROUT_CONFIG_DISABLE_USER_CONFIG + #ifndef SPROUT_CONFIG_DISABLE_AUTO_CONFIG # include #endif // #ifndef SPROUT_CONFIG_DISABLE_AUTO_CONFIG diff --git a/sprout/config/user.hpp b/sprout/config/user_config.hpp similarity index 68% rename from sprout/config/user.hpp rename to sprout/config/user_config.hpp index ccbcd28f..4e0f3f5e 100644 --- a/sprout/config/user.hpp +++ b/sprout/config/user_config.hpp @@ -5,12 +5,13 @@ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#ifndef SPROUT_CONFIG_USER_HPP -#define SPROUT_CONFIG_USER_HPP +#ifndef SPROUT_CONFIG_USER_CONFIG_HPP +#define SPROUT_CONFIG_USER_CONFIG_HPP // -// 言語機能を無効化するコンフィグ -// ユーザ定義されない場合、処理系に応じて自動的に定義される。 +// Configuration to disable the language features +// +// If the user does not define, automatically defined according to the compiler. // //#define SPROUT_CONFIG_DISABLE_CONSTEXPR //#define SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR @@ -25,9 +26,10 @@ //#define SPROUT_CONFIG_DISABLE_VARIABLE_TEMPLATES // -// 言語機能を強制的に有効化するコンフィグ -// SPROUT_CONFIG_DISABLE_*** の自動定義を抑制する。 -// SPROUT_CONFIG_DISABLE_*** がユーザ定義されている場合、無効化のほうが優先される。 +// Configuration to forcibly enable the language features +// +// Suppress the automatic definition: SPROUT_CONFIG_DISABLE_*** +// If a user definition is, invalidation is priority. (SPROUT_CONFIG_DISABLE_***) // //#define SPROUT_CONFIG_FORCE_CONSTEXPR //#define SPROUT_CONFIG_FORCE_CXX14_CONSTEXPR @@ -42,23 +44,27 @@ //#define SPROUT_CONFIG_FORCE_VARIABLE_TEMPLATES // -// 実装に外部ライブラリを使用するコンフィグ +// Configuration you want to use an external library to implementation // //#define SPROUT_CONFIG_USE_SSCRISK_CEL // -// 処理系機能を無効化するコンフィグ -// ユーザ定義されない場合、処理系に応じて自動的に定義される。 +// Configuration to disable the function of the compiler +// +// If the user does not define, automatically defined according to the compiler. // //#define SPROUT_CONFIG_DISABLE_BUILTIN_CMATH_FUNCTION //#define SPROUT_CONFIG_DISABLE_BUILTIN_COPYSIGN_FUNCTION //#define SPROUT_CONFIG_DISABLE_BUILTIN_BIT_OPERATION // -// 実装の詳細を切り替えるコンフィグ +// Configuration to switch the implementation details // //#define SPROUT_CONFIG_DISABLE_LARGE_FLOAT_ROUNDING //#define SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION //#define SPROUT_CONFIG_DISABLE_SUPPORT_EFFICIENT_ARRAY_ITERATION -#endif // #ifndef SPROUT_CONFIG_USER_HPP +//#define SPROUT_CONFIG_DISABLE_USER_CONFIG +//#define SPROUT_CONFIG_DISABLE_AUTO_CONFIG + +#endif // #ifndef SPROUT_CONFIG_USER_CONFIG_HPP diff --git a/sprout/ctype/ascii.hpp b/sprout/ctype/ascii.hpp index fa494f8d..08f3a61a 100644 --- a/sprout/ctype/ascii.hpp +++ b/sprout/ctype/ascii.hpp @@ -175,6 +175,7 @@ namespace sprout { : 0 ; } +#if SPROUT_USE_UNICODE_LITERALS inline SPROUT_CONSTEXPR std::size_t get_value(char16_t c) { return static_cast(c) < sprout::ascii::detail::table_size ? sprout::ascii::detail::table[static_cast(c)] @@ -187,6 +188,7 @@ namespace sprout { : 0 ; } +#endif } // namespace detail #define SPROUT_CTYPE_ASCII_DECL(CHAR_TYPE, PREFIX) \ @@ -282,8 +284,10 @@ namespace sprout { // SPROUT_CTYPE_ASCII_DECL(char, SPROUT_PP_EMPTY()) SPROUT_CTYPE_ASCII_DECL(wchar_t, SPROUT_PP_EMPTY()) +#if SPROUT_USE_UNICODE_LITERALS SPROUT_CTYPE_ASCII_DECL(char16_t, SPROUT_PP_EMPTY()) SPROUT_CTYPE_ASCII_DECL(char32_t, SPROUT_PP_EMPTY()) +#endif } // namespace ascii using sprout::ascii::isalnum; diff --git a/sprout/detail/integer.hpp b/sprout/detail/integer.hpp index fa3a1f7f..9b62de79 100644 --- a/sprout/detail/integer.hpp +++ b/sprout/detail/integer.hpp @@ -81,7 +81,8 @@ namespace sprout { struct exact_signed_base_helper { typedef short exact; }; - template<> struct exact_unsigned_base_helper { + template<> + struct exact_unsigned_base_helper { typedef unsigned short exact; }; #endif diff --git a/sprout/detail/io_fwd.hpp b/sprout/detail/io_fwd.hpp index 7136180c..63db38c2 100644 --- a/sprout/detail/io_fwd.hpp +++ b/sprout/detail/io_fwd.hpp @@ -35,38 +35,52 @@ namespace sprout { typedef sprout::detail::io::basic_ios_iostate_saver ios_iostate_saver; typedef sprout::detail::io::basic_ios_iostate_saver wios_iostate_saver; +#if SPROUT_USE_UNICODE_LITERALS typedef sprout::detail::io::basic_ios_iostate_saver u16ios_iostate_saver; typedef sprout::detail::io::basic_ios_iostate_saver u32ios_iostate_saver; +#endif typedef sprout::detail::io::basic_ios_exception_saver ios_exception_saver; typedef sprout::detail::io::basic_ios_exception_saver wios_exception_saver; +#if SPROUT_USE_UNICODE_LITERALS typedef sprout::detail::io::basic_ios_exception_saver u16ios_exception_saver; typedef sprout::detail::io::basic_ios_exception_saver u32ios_exception_saver; +#endif typedef sprout::detail::io::basic_ios_tie_saver ios_tie_saver; typedef sprout::detail::io::basic_ios_tie_saver wios_tie_saver; +#if SPROUT_USE_UNICODE_LITERALS typedef sprout::detail::io::basic_ios_tie_saver u16ios_tie_saver; typedef sprout::detail::io::basic_ios_tie_saver u32ios_tie_saver; +#endif typedef sprout::detail::io::basic_ios_rdbuf_saver ios_rdbuf_saver; typedef sprout::detail::io::basic_ios_rdbuf_saver wios_rdbuf_saver; +#if SPROUT_USE_UNICODE_LITERALS typedef sprout::detail::io::basic_ios_rdbuf_saver u16ios_rdbuf_saver; typedef sprout::detail::io::basic_ios_rdbuf_saver u32ios_rdbuf_saver; +#endif typedef sprout::detail::io::basic_ios_fill_saver ios_fill_saver; typedef sprout::detail::io::basic_ios_fill_saver wios_fill_saver; +#if SPROUT_USE_UNICODE_LITERALS typedef sprout::detail::io::basic_ios_fill_saver u16ios_fill_saver; typedef sprout::detail::io::basic_ios_fill_saver u32ios_fill_saver; +#endif typedef sprout::detail::io::basic_ios_locale_saver ios_locale_saver; typedef sprout::detail::io::basic_ios_locale_saver wios_locale_saver; +#if SPROUT_USE_UNICODE_LITERALS typedef sprout::detail::io::basic_ios_locale_saver u16ios_locale_saver; typedef sprout::detail::io::basic_ios_locale_saver u32ios_locale_saver; +#endif typedef sprout::detail::io::basic_ios_all_saver ios_all_saver; typedef sprout::detail::io::basic_ios_all_saver wios_all_saver; +#if SPROUT_USE_UNICODE_LITERALS typedef sprout::detail::io::basic_ios_all_saver u16ios_all_saver; typedef sprout::detail::io::basic_ios_all_saver u32ios_all_saver; +#endif class ios_iword_saver; class ios_pword_saver; diff --git a/sprout/functional/hash/hash.hpp b/sprout/functional/hash/hash.hpp index 26fe82e2..b8e82815 100644 --- a/sprout/functional/hash/hash.hpp +++ b/sprout/functional/hash/hash.hpp @@ -81,8 +81,10 @@ namespace sprout { SPROUT_HASH_SPECIALIZE(char); SPROUT_HASH_SPECIALIZE(signed char); SPROUT_HASH_SPECIALIZE(unsigned char); +#if SPROUT_USE_UNICODE_LITERALS SPROUT_HASH_SPECIALIZE(char16_t); SPROUT_HASH_SPECIALIZE(char32_t); +#endif SPROUT_HASH_SPECIALIZE(wchar_t); SPROUT_HASH_SPECIALIZE(short); SPROUT_HASH_SPECIALIZE(unsigned short); diff --git a/sprout/limits.hpp b/sprout/limits.hpp index a956d276..9ae3cbd8 100644 --- a/sprout/limits.hpp +++ b/sprout/limits.hpp @@ -201,6 +201,7 @@ namespace sprout { SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL(signed char, SCHAR_MIN, SCHAR_MAX); SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL(unsigned char, static_cast(0), UCHAR_MAX); +#if SPROUT_USE_UNICODE_LITERALS SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL( char16_t, static_cast(sprout::numeric_limits::min()), @@ -211,6 +212,7 @@ namespace sprout { static_cast(sprout::numeric_limits::min()), static_cast(sprout::numeric_limits::max()) ); +#endif SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL(wchar_t, WCHAR_MIN, WCHAR_MAX); #undef SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL diff --git a/sprout/string/alias.hpp b/sprout/string/alias.hpp index b19f4bd4..7adffaf5 100644 --- a/sprout/string/alias.hpp +++ b/sprout/string/alias.hpp @@ -26,10 +26,12 @@ namespace sprout { using string = sprout::basic_string; template using wstring = sprout::basic_string; +#if SPROUT_USE_UNICODE_LITERALS template using u16string = sprout::basic_string; template using u32string = sprout::basic_string; +#endif #endif // #if SPROUT_USE_TEMPLATE_ALIASES } // namespace sprout diff --git a/sprout/string/float_to_string.hpp b/sprout/string/float_to_string.hpp index 68365913..bf4485bc 100644 --- a/sprout/string/float_to_string.hpp +++ b/sprout/string/float_to_string.hpp @@ -218,6 +218,7 @@ namespace sprout { return sprout::to_string_of(val); } +#if SPROUT_USE_UNICODE_LITERALS // // to_u16string // @@ -235,6 +236,7 @@ namespace sprout { to_u32string(FloatType val) { return sprout::to_string_of(val); } +#endif } // namespace sprout #endif // #ifndef SPROUT_STRING_FLOAT_TO_STRING_HPP diff --git a/sprout/string/int_to_string.hpp b/sprout/string/int_to_string.hpp index d108a2fe..b0725d8e 100644 --- a/sprout/string/int_to_string.hpp +++ b/sprout/string/int_to_string.hpp @@ -121,6 +121,7 @@ namespace sprout { return sprout::to_string_of(val); } +#if SPROUT_USE_UNICODE_LITERALS // // to_u16string // @@ -138,6 +139,7 @@ namespace sprout { to_u32string(IntType val) { return sprout::to_string_of(val); } +#endif } // namespace sprout #endif // #ifndef SPROUT_STRING_INT_TO_STRING_HPP diff --git a/sprout/string/type_traits.hpp b/sprout/string/type_traits.hpp index 8a8b5dc4..c2d2162e 100644 --- a/sprout/string/type_traits.hpp +++ b/sprout/string/type_traits.hpp @@ -30,6 +30,7 @@ namespace sprout { public: typedef sprout::basic_string type; }; +#if SPROUT_USE_UNICODE_LITERALS // // u16string_t // @@ -46,6 +47,7 @@ namespace sprout { public: typedef sprout::basic_string type; }; +#endif // // is_basic_string @@ -101,6 +103,7 @@ namespace sprout { struct is_wstring : public sprout::is_string_of {}; +#if SPROUT_USE_UNICODE_LITERALS // // is_u16string // @@ -115,6 +118,7 @@ namespace sprout { struct is_u32string : public sprout::is_string_of {}; +#endif #if SPROUT_USE_VARIABLE_TEMPLATES template @@ -125,10 +129,12 @@ namespace sprout { SPROUT_STATIC_CONSTEXPR bool is_string_v = sprout::is_string::value; template SPROUT_STATIC_CONSTEXPR bool is_wstring_v = sprout::is_wstring::value; +#if SPROUT_USE_UNICODE_LITERALS template SPROUT_STATIC_CONSTEXPR bool is_u16string_v = sprout::is_u16string::value; template SPROUT_STATIC_CONSTEXPR bool is_u32string_v = sprout::is_u32string::value; +#endif #endif // #if SPROUT_USE_VARIABLE_TEMPLATES } // namespace sprout diff --git a/sprout/type/joint_types.hpp b/sprout/type/joint_types.hpp index 363aff6d..e255c811 100644 --- a/sprout/type/joint_types.hpp +++ b/sprout/type/joint_types.hpp @@ -80,12 +80,15 @@ namespace sprout { struct joint_types_default_apply, IntSeqClass > \ : public sprout::identity...> > \ {} + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(bool); SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(char); SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(signed char); SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(unsigned char); +#if SPROUT_USE_UNICODE_LITERALS SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(char16_t); SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(char32_t); +#endif SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(wchar_t); SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(short); SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(unsigned short); @@ -96,6 +99,7 @@ namespace sprout { SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(long long); SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(unsigned long long); #undef SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE + template class TupleClass, typename... Ts> struct joint_types_default > { public: @@ -167,6 +171,39 @@ namespace sprout { struct joint_types_default_apply, IntSeqClass > \ : public sprout::identity > \ {} +#if SPROUT_USE_UNICODE_LITERALS +#define SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_(BASE) \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, bool); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, char); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, signed char); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned char); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, char16_t); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, char32_t); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, wchar_t); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, short); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned short); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, int); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned int); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, long); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned long); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, long long); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned long long) +#else +#define SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_(BASE) \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, bool); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, char); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, signed char); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned char); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, wchar_t); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, short); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned short); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, int); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned int); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, long); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned long); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, long long); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned long long) +#endif #define SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(BASE) \ template< \ template class IntegerSequenceClass, BASE... Vs, \ @@ -189,21 +226,7 @@ namespace sprout { struct joint_types_default_apply, IntSeqClass > \ : public sprout::identity > \ {}; \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, bool); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, char); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, signed char); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned char); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, char16_t); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, char32_t); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, wchar_t); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, short); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned short); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, int); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned int); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, long); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned long); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, long long); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned long long); \ + SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_(BASE); \ template class IntegerSequenceClass, BASE... Vs> \ struct joint_types_default > { \ public: \ @@ -216,8 +239,10 @@ namespace sprout { SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(char); SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(signed char); SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(unsigned char); +#if SPROUT_USE_UNICODE_LITERALS SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(char16_t); SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(char32_t); +#endif SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(wchar_t); SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(short); SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(unsigned short); diff --git a/sprout/type/map_types.hpp b/sprout/type/map_types.hpp index 2ed04227..9dae96ea 100644 --- a/sprout/type/map_types.hpp +++ b/sprout/type/map_types.hpp @@ -68,8 +68,10 @@ namespace sprout { SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(char); SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(signed char); SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned char); +#if SPROUT_USE_UNICODE_LITERALS SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(char16_t); SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(char32_t); +#endif SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(wchar_t); SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(short); SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned short); diff --git a/sprout/type/pop_front_types.hpp b/sprout/type/pop_front_types.hpp index 0de8b7d2..872723aa 100644 --- a/sprout/type/pop_front_types.hpp +++ b/sprout/type/pop_front_types.hpp @@ -66,8 +66,10 @@ namespace sprout { SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(char); SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(signed char); SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned char); +#if SPROUT_USE_UNICODE_LITERALS SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(char16_t); SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(char32_t); +#endif SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(wchar_t); SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(short); SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned short); diff --git a/sprout/type/rebind_types.hpp b/sprout/type/rebind_types.hpp index e2c6bfa3..c3be05b1 100644 --- a/sprout/type/rebind_types.hpp +++ b/sprout/type/rebind_types.hpp @@ -48,8 +48,10 @@ namespace sprout { SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(char); SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(signed char); SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned char); +#if SPROUT_USE_UNICODE_LITERALS SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(char16_t); SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(char32_t); +#endif SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(wchar_t); SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(short); SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned short); diff --git a/sprout/type/string/alias.hpp b/sprout/type/string/alias.hpp index b8b01531..3ed01786 100644 --- a/sprout/type/string/alias.hpp +++ b/sprout/type/string/alias.hpp @@ -25,16 +25,18 @@ namespace sprout { // template using wstring = sprout::types::basic_string; +#if SPROUT_USE_UNICODE_LITERALS // // u16string // template using u16string = sprout::types::basic_string; // - // string + // u32string // template using u32string = sprout::types::basic_string; +#endif } // namespace types } // namespace sprout diff --git a/sprout/type/tuple.hpp b/sprout/type/tuple.hpp index eeb9d190..38af5845 100644 --- a/sprout/type/tuple.hpp +++ b/sprout/type/tuple.hpp @@ -64,8 +64,10 @@ namespace sprout { SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(char); SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(signed char); SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(unsigned char); +#if SPROUT_USE_UNICODE_LITERALS SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(char16_t); SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(char32_t); +#endif SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(wchar_t); SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(short); SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(unsigned short); @@ -121,8 +123,10 @@ namespace sprout { SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(char); SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(signed char); SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(unsigned char); +#if SPROUT_USE_UNICODE_LITERALS SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(char16_t); SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(char32_t); +#endif SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(wchar_t); SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(short); SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(unsigned short); diff --git a/sprout/type_traits/is_c_str.hpp b/sprout/type_traits/is_c_str.hpp index c032c9fd..8b3e69a9 100644 --- a/sprout/type_traits/is_c_str.hpp +++ b/sprout/type_traits/is_c_str.hpp @@ -40,6 +40,7 @@ namespace sprout { struct is_c_str : public sprout::true_type {}; +#if SPROUT_USE_UNICODE_LITERALS template struct is_c_str : public sprout::true_type @@ -48,6 +49,7 @@ namespace sprout { struct is_c_str : public sprout::true_type {}; +#endif #if SPROUT_USE_VARIABLE_TEMPLATES template diff --git a/sprout/type_traits/is_char_type.hpp b/sprout/type_traits/is_char_type.hpp index 57a52957..a2ff38b2 100644 --- a/sprout/type_traits/is_char_type.hpp +++ b/sprout/type_traits/is_char_type.hpp @@ -39,6 +39,7 @@ namespace sprout { struct is_char_type : public sprout::true_type {}; +#if SPROUT_USE_UNICODE_LITERALS template<> struct is_char_type : public sprout::true_type @@ -47,6 +48,7 @@ namespace sprout { struct is_char_type : public sprout::true_type {}; +#endif #if SPROUT_USE_VARIABLE_TEMPLATES template diff --git a/sprout/utility/string_ref/alias.hpp b/sprout/utility/string_ref/alias.hpp index a93bdfbe..415b6cbc 100644 --- a/sprout/utility/string_ref/alias.hpp +++ b/sprout/utility/string_ref/alias.hpp @@ -22,8 +22,10 @@ namespace sprout { // typedef sprout::basic_string_ref string_ref; typedef sprout::basic_string_ref wstring_ref; +#if SPROUT_USE_UNICODE_LITERALS typedef sprout::basic_string_ref u16string_ref; typedef sprout::basic_string_ref u32string_ref; +#endif // // string_view // wstring_view @@ -32,8 +34,10 @@ namespace sprout { // typedef sprout::basic_string_ref string_view; typedef sprout::basic_string_ref wstring_view; +#if SPROUT_USE_UNICODE_LITERALS typedef sprout::basic_string_ref u16string_view; typedef sprout::basic_string_ref u32string_view; +#endif #if SPROUT_USE_TEMPLATE_ALIASES // @@ -122,6 +126,8 @@ namespace sprout { : public sprout::is_wstring_ref {}; #endif // #if SPROUT_USE_TEMPLATE_ALIASES + +#if SPROUT_USE_UNICODE_LITERALS // // is_u16string_view // @@ -146,6 +152,7 @@ namespace sprout { : public sprout::is_u32string_ref {}; #endif // #if SPROUT_USE_TEMPLATE_ALIASES +#endif #if SPROUT_USE_VARIABLE_TEMPLATES template @@ -156,10 +163,12 @@ namespace sprout { SPROUT_STATIC_CONSTEXPR bool is_string_view_v = sprout::is_string_view::value; template SPROUT_STATIC_CONSTEXPR bool is_wstring_view_v = sprout::is_wstring_view::value; +#if SPROUT_USE_UNICODE_LITERALS template SPROUT_STATIC_CONSTEXPR bool is_u16string_view_v = sprout::is_u16string_view::value; template SPROUT_STATIC_CONSTEXPR bool is_u32string_view_v = sprout::is_u32string_view::value; +#endif #endif // #if SPROUT_USE_VARIABLE_TEMPLATES } // namespace sprout diff --git a/sprout/utility/string_ref/type_traits.hpp b/sprout/utility/string_ref/type_traits.hpp index 2aa7f5dd..dab432d3 100644 --- a/sprout/utility/string_ref/type_traits.hpp +++ b/sprout/utility/string_ref/type_traits.hpp @@ -67,6 +67,7 @@ namespace sprout { struct is_wstring_ref : public sprout::is_string_ref_of {}; +#if SPROUT_USE_UNICODE_LITERALS // // is_u16string_ref // @@ -81,6 +82,7 @@ namespace sprout { struct is_u32string_ref : public sprout::is_string_ref_of {}; +#endif #if SPROUT_USE_VARIABLE_TEMPLATES template @@ -91,10 +93,12 @@ namespace sprout { SPROUT_STATIC_CONSTEXPR bool is_string_ref_v = sprout::is_string_ref::value; template SPROUT_STATIC_CONSTEXPR bool is_wstring_ref_v = sprout::is_wstring_ref::value; +#if SPROUT_USE_UNICODE_LITERALS template SPROUT_STATIC_CONSTEXPR bool is_u16string_ref_v = sprout::is_u16string_ref::value; template SPROUT_STATIC_CONSTEXPR bool is_u32string_ref_v = sprout::is_u32string_ref::value; +#endif #endif // #if SPROUT_USE_VARIABLE_TEMPLATES } // namespace sprout diff --git a/sprout/uuid/io.hpp b/sprout/uuid/io.hpp index fd7cd867..eb873624 100644 --- a/sprout/uuid/io.hpp +++ b/sprout/uuid/io.hpp @@ -177,6 +177,7 @@ namespace sprout { to_wstring(sprout::uuids::uuid const& u) { return sprout::uuids::to_string_of(u); } +#if SPROUT_USE_UNICODE_LITERALS inline SPROUT_CONSTEXPR sprout::basic_string to_u16string(sprout::uuids::uuid const& u) { return sprout::uuids::to_string_of(u); @@ -185,6 +186,7 @@ namespace sprout { to_u32string(sprout::uuids::uuid const& u) { return sprout::uuids::to_string_of(u); } +#endif } // namespace uuids } // namespace sprout diff --git a/sprout/uuid/md5_name_generator.hpp b/sprout/uuid/md5_name_generator.hpp index 36666bbc..3e754e16 100644 --- a/sprout/uuid/md5_name_generator.hpp +++ b/sprout/uuid/md5_name_generator.hpp @@ -67,12 +67,14 @@ namespace sprout { SPROUT_CONSTEXPR result_type operator()(wchar_t const* name) const { return sha_to_uuid(sum_.c_process_bytes(name, sprout::char_traits::length(name))); } +#if SPROUT_USE_UNICODE_LITERALS SPROUT_CONSTEXPR result_type operator()(char16_t const* name) const { return sha_to_uuid(sum_.c_process_bytes(name, sprout::char_traits::length(name))); } SPROUT_CONSTEXPR result_type operator()(char32_t const* name) const { return sha_to_uuid(sum_.c_process_bytes(name, sprout::char_traits::length(name))); } +#endif }; // @@ -91,6 +93,7 @@ namespace sprout { make_uuid3(wchar_t const* name) { return sprout::uuids::md5_name_generator()(name); } +#if SPROUT_USE_UNICODE_LITERALS inline SPROUT_CONSTEXPR sprout::uuids::uuid make_uuid3(char16_t const* name) { return sprout::uuids::md5_name_generator()(name); @@ -99,6 +102,7 @@ namespace sprout { make_uuid3(char32_t const* name) { return sprout::uuids::md5_name_generator()(name); } +#endif template inline SPROUT_CONSTEXPR sprout::uuids::uuid @@ -113,6 +117,7 @@ namespace sprout { make_uuid3(sprout::uuids::uuid const& namespace_uuid, wchar_t const* name) { return sprout::uuids::md5_name_generator(namespace_uuid)(name); } +#if SPROUT_USE_UNICODE_LITERALS 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); @@ -121,6 +126,7 @@ namespace sprout { make_uuid3(sprout::uuids::uuid const& namespace_uuid, char32_t const* name) { return sprout::uuids::md5_name_generator(namespace_uuid)(name); } +#endif inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator make_uuid3() { diff --git a/sprout/uuid/sha1_name_generator.hpp b/sprout/uuid/sha1_name_generator.hpp index b02ef83b..005c95d2 100644 --- a/sprout/uuid/sha1_name_generator.hpp +++ b/sprout/uuid/sha1_name_generator.hpp @@ -67,12 +67,14 @@ namespace sprout { SPROUT_CONSTEXPR result_type operator()(wchar_t const* name) const { return sha_to_uuid(sum_.c_process_bytes(name, sprout::char_traits::length(name))); } +#if SPROUT_USE_UNICODE_LITERALS SPROUT_CONSTEXPR result_type operator()(char16_t const* name) const { return sha_to_uuid(sum_.c_process_bytes(name, sprout::char_traits::length(name))); } SPROUT_CONSTEXPR result_type operator()(char32_t const* name) const { return sha_to_uuid(sum_.c_process_bytes(name, sprout::char_traits::length(name))); } +#endif }; // @@ -91,6 +93,7 @@ namespace sprout { make_uuid5(wchar_t const* name) { return sprout::uuids::sha1_name_generator()(name); } +#if SPROUT_USE_UNICODE_LITERALS inline SPROUT_CONSTEXPR sprout::uuids::uuid make_uuid5(char16_t const* name) { return sprout::uuids::sha1_name_generator()(name); @@ -99,6 +102,7 @@ namespace sprout { make_uuid5(char32_t const* name) { return sprout::uuids::sha1_name_generator()(name); } +#endif template inline SPROUT_CONSTEXPR sprout::uuids::uuid @@ -113,6 +117,7 @@ namespace sprout { make_uuid5(sprout::uuids::uuid const& namespace_uuid, wchar_t const* name) { return sprout::uuids::sha1_name_generator(namespace_uuid)(name); } +#if SPROUT_USE_UNICODE_LITERALS 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); @@ -121,6 +126,7 @@ namespace sprout { make_uuid5(sprout::uuids::uuid const& namespace_uuid, char32_t const* name) { return sprout::uuids::sha1_name_generator(namespace_uuid)(name); } +#endif inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator make_uuid5() { diff --git a/sprout/uuid/string_generator.hpp b/sprout/uuid/string_generator.hpp index 42cc347e..ae8fa8f0 100644 --- a/sprout/uuid/string_generator.hpp +++ b/sprout/uuid/string_generator.hpp @@ -177,12 +177,14 @@ namespace sprout { SPROUT_CONSTEXPR result_type operator()(wchar_t const* s) const { return operator()(s, s + sprout::char_traits::length(s)); } +#if SPROUT_USE_UNICODE_LITERALS SPROUT_CONSTEXPR result_type operator()(char16_t const* s) const { return operator()(s, s + sprout::char_traits::length(s)); } SPROUT_CONSTEXPR result_type operator()(char32_t const* s) const { return operator()(s, s + sprout::char_traits::length(s)); } +#endif }; // @@ -206,6 +208,7 @@ namespace sprout { make_uuid(wchar_t const* s) { return sprout::uuids::string_generator()(s); } +#if SPROUT_USE_UNICODE_LITERALS inline SPROUT_CONSTEXPR sprout::uuids::uuid make_uuid(char16_t const* s) { return sprout::uuids::string_generator()(s); @@ -214,6 +217,7 @@ namespace sprout { make_uuid(char32_t const* s) { return sprout::uuids::string_generator()(s); } +#endif } // namespace uuids } // namespace sprout diff --git a/sprout/uuid/udl.hpp b/sprout/uuid/udl.hpp index f08845e3..47de8f7c 100644 --- a/sprout/uuid/udl.hpp +++ b/sprout/uuid/udl.hpp @@ -72,6 +72,7 @@ namespace sprout { operator"" _uuid(wchar_t const* s, std::size_t size) { return sprout::uuids::make_uuid(s, s + size); } +#if SPROUT_USE_UNICODE_LITERALS inline SPROUT_CONSTEXPR sprout::uuids::uuid operator"" _uuid(char16_t const* s, std::size_t size) { return sprout::uuids::make_uuid(s, s + size); @@ -80,6 +81,7 @@ namespace sprout { operator"" _uuid(char32_t const* s, std::size_t size) { return sprout::uuids::make_uuid(s, s + size); } +#endif // // _uuid3 @@ -92,6 +94,7 @@ namespace sprout { operator"" _uuid3(wchar_t const* s, std::size_t size) { return sprout::uuids::detail::uuid3_impl(sprout::range::make_ptr_range(s, size)); } +#if SPROUT_USE_UNICODE_LITERALS 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)); @@ -100,6 +103,7 @@ namespace sprout { operator"" _uuid3(char32_t const* s, std::size_t size) { return sprout::uuids::detail::uuid3_impl(sprout::range::make_ptr_range(s, size)); } +#endif // // _uuid5 @@ -112,6 +116,7 @@ namespace sprout { operator"" _uuid5(wchar_t const* s, std::size_t size) { return sprout::uuids::detail::uuid5_impl(sprout::range::make_ptr_range(s, size)); } +#if SPROUT_USE_UNICODE_LITERALS 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)); @@ -120,6 +125,7 @@ namespace sprout { operator"" _uuid5(char32_t const* s, std::size_t size) { return sprout::uuids::detail::uuid5_impl(sprout::range::make_ptr_range(s, size)); } +#endif } // namespace udl using sprout::uuids::udl::operator"" _uuid;