From 2c81be72eef5363736cf1892646c74a3311ee4c1 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Sun, 22 May 2022 17:03:17 -0400 Subject: add upstream 11.21 --- zen/string_traits.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'zen/string_traits.h') diff --git a/zen/string_traits.h b/zen/string_traits.h index ca40f7d6..1a4f4740 100644 --- a/zen/string_traits.h +++ b/zen/string_traits.h @@ -15,9 +15,9 @@ //uniform access to string-like types, both classes and character arrays namespace zen { -/* IsStringLikeV<>: - IsStringLikeV //equals "true" - IsStringLikeV //equals "false" +/* isStringLike<>: + isStringLike //equals "true" + isStringLike //equals "false" GetCharTypeT<>: GetCharTypeT //equals wchar_t @@ -51,7 +51,7 @@ template auto makeStringView(Iterator first, size_t len); //---------------------- implementation ---------------------- namespace impl { -template //test if result of S::c_str() can convert to const Char* +template //test if result of S::c_str() can convert to const Char* class HasConversion { using Yes = char[1]; @@ -105,9 +105,9 @@ class StringTraits public: enum { - isStringClass = HasMemberTypeV_value_type&& - HasMemberV_c_str && - HasMemberV_length + isStringClass = hasMemberType_value_type && + hasMember_c_str && + hasMember_length }; using CharType = typename GetCharTypeImpl::Type; @@ -121,10 +121,10 @@ public: } -template -constexpr bool IsStringLikeV = impl::StringTraits::isStringLike; +template +constexpr bool isStringLike = impl::StringTraits::isStringLike; -template +template using GetCharTypeT = typename impl::StringTraits::CharType; @@ -184,7 +184,7 @@ inline size_t strLength(const std::basic_string_view& ref) { retu template inline auto strBegin(S&& str) { - static_assert(IsStringLikeV); + static_assert(isStringLike); return impl::strBegin(std::forward(str)); } @@ -192,7 +192,7 @@ auto strBegin(S&& str) template inline size_t strLength(S&& str) { - static_assert(IsStringLikeV); + static_assert(isStringLike); return impl::strLength(std::forward(str)); } -- cgit