From 94db751716dd2851f99b5c4c2981da1d1f4780f8 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 2 Oct 2015 14:53:20 +0200 Subject: 6.11 --- zen/string_traits.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'zen/string_traits.h') diff --git a/zen/string_traits.h b/zen/string_traits.h index 69c1fbc8..ba97397c 100644 --- a/zen/string_traits.h +++ b/zen/string_traits.h @@ -8,8 +8,6 @@ #define STRING_TRAITS_HEADER_813274321443234 #include "type_tools.h" -#include "assert_static.h" - //uniform access to string-like types, both classes and character arrays namespace zen @@ -165,7 +163,11 @@ namespace implementation template inline size_t cStringLength(const C* str) //naive implementation seems somewhat faster than "optimized" strlen/wcslen! { - assert_static((IsSameType::value || IsSameType::value)); +#if defined _MSC_VER && _MSC_VER > 1800 + static_assert(false, "strlen/wcslen are vectorized in VS14 CTP3 -> test again!"); +#endif + + static_assert(IsSameType::value || IsSameType::value, ""); size_t len = 0; while (*str++ != 0) ++len; @@ -184,8 +186,8 @@ inline const char* strBegin(const char* str) { return str; } inline const wchar_t* strBegin(const wchar_t* str) { return str; } inline const char* strBegin(const char& ch) { return &ch; } inline const wchar_t* strBegin(const wchar_t& ch) { return &ch; } -inline const char* strBegin(const StringRef& ref) { return ref.data(); } -inline const wchar_t* strBegin(const StringRef& ref) { return ref.data(); } +inline const char* strBegin(const StringRef& ref) { return ref.data(); } +inline const wchar_t* strBegin(const StringRef& ref) { return ref.data(); } template inline -- cgit