From 9b623ea3943165fe7efb5e47a0b5b9452c1599e6 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Wed, 9 May 2018 00:09:55 +0200 Subject: 9.8 --- zen/string_traits.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'zen/string_traits.h') diff --git a/zen/string_traits.h b/zen/string_traits.h index 502250c2..805db46d 100755 --- a/zen/string_traits.h +++ b/zen/string_traits.h @@ -63,7 +63,7 @@ private: //---------------------- implementation ---------------------- -namespace implementation +namespace impl { template //test if result of S::c_str() can convert to const Char* class HasConversion @@ -137,13 +137,13 @@ public: } template -struct IsStringLike : StaticBool::isStringLike> {}; +struct IsStringLike : StaticBool::isStringLike> {}; template -struct GetCharType : ResultType::CharType> {}; +struct GetCharType : ResultType::CharType> {}; -namespace implementation +namespace impl { //strlen/wcslen are vectorized since VS14 CTP3 inline size_t cStringLength(const char* str) { return std::strlen(str); } @@ -162,7 +162,7 @@ size_t cStringLength(const C* str) } #endif -template ::isStringClass>::Type> inline +template ::isStringClass>::Type> inline const typename GetCharType::Type* strBegin(const S& str) //SFINAE: T must be a "string" { return str.c_str(); @@ -179,7 +179,7 @@ inline const char* strBegin(const StringRef& ref) { return ref inline const wchar_t* strBegin(const StringRef& ref) { return ref.data(); } -template ::isStringClass>::Type> inline +template ::isStringClass>::Type> inline size_t strLength(const S& str) //SFINAE: T must be a "string" { return str.length(); @@ -201,7 +201,7 @@ template inline auto strBegin(S&& str) -> const typename GetCharType::Type* { static_assert(IsStringLike::value, ""); - return implementation::strBegin(std::forward(str)); + return impl::strBegin(std::forward(str)); } @@ -209,7 +209,7 @@ template inline size_t strLength(S&& str) { static_assert(IsStringLike::value, ""); - return implementation::strLength(std::forward(str)); + return impl::strLength(std::forward(str)); } } -- cgit