summaryrefslogtreecommitdiff
path: root/zen/string_traits.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2018-05-09 00:09:55 +0200
committerDaniel Wilhelm <shieldwed@outlook.com>2018-05-09 00:09:55 +0200
commit9b623ea3943165fe7efb5e47a0b5b9452c1599e6 (patch)
treedde40e07e907ac6e0ca9ea32524f2cd4810d4be6 /zen/string_traits.h
parent9.7 (diff)
downloadFreeFileSync-9b623ea3943165fe7efb5e47a0b5b9452c1599e6.tar.gz
FreeFileSync-9b623ea3943165fe7efb5e47a0b5b9452c1599e6.tar.bz2
FreeFileSync-9b623ea3943165fe7efb5e47a0b5b9452c1599e6.zip
9.8
Diffstat (limited to 'zen/string_traits.h')
-rwxr-xr-xzen/string_traits.h16
1 files changed, 8 insertions, 8 deletions
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<class S, class Char> //test if result of S::c_str() can convert to const Char*
class HasConversion
@@ -137,13 +137,13 @@ public:
}
template <class T>
-struct IsStringLike : StaticBool<implementation::StringTraits<T>::isStringLike> {};
+struct IsStringLike : StaticBool<impl::StringTraits<T>::isStringLike> {};
template <class T>
-struct GetCharType : ResultType<typename implementation::StringTraits<T>::CharType> {};
+struct GetCharType : ResultType<typename impl::StringTraits<T>::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 <class S, typename = typename EnableIf<implementation::StringTraits<S>::isStringClass>::Type> inline
+template <class S, typename = typename EnableIf<StringTraits<S>::isStringClass>::Type> inline
const typename GetCharType<S>::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<const char >& ref) { return ref
inline const wchar_t* strBegin(const StringRef<const wchar_t>& ref) { return ref.data(); }
-template <class S, typename = typename EnableIf<implementation::StringTraits<S>::isStringClass>::Type> inline
+template <class S, typename = typename EnableIf<StringTraits<S>::isStringClass>::Type> inline
size_t strLength(const S& str) //SFINAE: T must be a "string"
{
return str.length();
@@ -201,7 +201,7 @@ template <class S> inline
auto strBegin(S&& str) -> const typename GetCharType<S>::Type*
{
static_assert(IsStringLike<S>::value, "");
- return implementation::strBegin(std::forward<S>(str));
+ return impl::strBegin(std::forward<S>(str));
}
@@ -209,7 +209,7 @@ template <class S> inline
size_t strLength(S&& str)
{
static_assert(IsStringLike<S>::value, "");
- return implementation::strLength(std::forward<S>(str));
+ return impl::strLength(std::forward<S>(str));
}
}
bgstack15