mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
workaround for disable unicode literals and types
This commit is contained in:
parent
4e0b3991b1
commit
7240e883c5
26 changed files with 152 additions and 29 deletions
|
@ -26,10 +26,12 @@ namespace sprout {
|
|||
using string = sprout::basic_string<char, N>;
|
||||
template<std::size_t N>
|
||||
using wstring = sprout::basic_string<wchar_t, N>;
|
||||
#if SPROUT_USE_UNICODE_LITERALS
|
||||
template<std::size_t N>
|
||||
using u16string = sprout::basic_string<char16_t, N>;
|
||||
template<std::size_t N>
|
||||
using u32string = sprout::basic_string<char32_t, N>;
|
||||
#endif
|
||||
#endif // #if SPROUT_USE_TEMPLATE_ALIASES
|
||||
} // namespace sprout
|
||||
|
||||
|
|
|
@ -218,6 +218,7 @@ namespace sprout {
|
|||
return sprout::to_string_of<wchar_t>(val);
|
||||
}
|
||||
|
||||
#if SPROUT_USE_UNICODE_LITERALS
|
||||
//
|
||||
// to_u16string
|
||||
//
|
||||
|
@ -235,6 +236,7 @@ namespace sprout {
|
|||
to_u32string(FloatType val) {
|
||||
return sprout::to_string_of<char32_t>(val);
|
||||
}
|
||||
#endif
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_STRING_FLOAT_TO_STRING_HPP
|
||||
|
|
|
@ -121,6 +121,7 @@ namespace sprout {
|
|||
return sprout::to_string_of<wchar_t>(val);
|
||||
}
|
||||
|
||||
#if SPROUT_USE_UNICODE_LITERALS
|
||||
//
|
||||
// to_u16string
|
||||
//
|
||||
|
@ -138,6 +139,7 @@ namespace sprout {
|
|||
to_u32string(IntType val) {
|
||||
return sprout::to_string_of<char32_t>(val);
|
||||
}
|
||||
#endif
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_STRING_INT_TO_STRING_HPP
|
||||
|
|
|
@ -30,6 +30,7 @@ namespace sprout {
|
|||
public:
|
||||
typedef sprout::basic_string<wchar_t, N> type;
|
||||
};
|
||||
#if SPROUT_USE_UNICODE_LITERALS
|
||||
//
|
||||
// u16string_t
|
||||
//
|
||||
|
@ -46,6 +47,7 @@ namespace sprout {
|
|||
public:
|
||||
typedef sprout::basic_string<char32_t, N> type;
|
||||
};
|
||||
#endif
|
||||
|
||||
//
|
||||
// is_basic_string
|
||||
|
@ -101,6 +103,7 @@ namespace sprout {
|
|||
struct is_wstring
|
||||
: public sprout::is_string_of<T, wchar_t>
|
||||
{};
|
||||
#if SPROUT_USE_UNICODE_LITERALS
|
||||
//
|
||||
// is_u16string
|
||||
//
|
||||
|
@ -115,6 +118,7 @@ namespace sprout {
|
|||
struct is_u32string
|
||||
: public sprout::is_string_of<T, char32_t>
|
||||
{};
|
||||
#endif
|
||||
|
||||
#if SPROUT_USE_VARIABLE_TEMPLATES
|
||||
template<typename T>
|
||||
|
@ -125,10 +129,12 @@ namespace sprout {
|
|||
SPROUT_STATIC_CONSTEXPR bool is_string_v = sprout::is_string<T>::value;
|
||||
template<typename T>
|
||||
SPROUT_STATIC_CONSTEXPR bool is_wstring_v = sprout::is_wstring<T>::value;
|
||||
#if SPROUT_USE_UNICODE_LITERALS
|
||||
template<typename T>
|
||||
SPROUT_STATIC_CONSTEXPR bool is_u16string_v = sprout::is_u16string<T>::value;
|
||||
template<typename T>
|
||||
SPROUT_STATIC_CONSTEXPR bool is_u32string_v = sprout::is_u32string<T>::value;
|
||||
#endif
|
||||
#endif // #if SPROUT_USE_VARIABLE_TEMPLATES
|
||||
} // namespace sprout
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue