[libcxx-commits] [PATCH] D58022: __builtin_strlen is not supported for MSVC e.g and it is not correct to use it without knowledge of this "builtin" in advance

Eric Fiselier via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Feb 10 21:11:32 PST 2019


EricWF added inline comments.


================
Comment at: __string:269
+#if __has_feature(cxx_constexpr_string_builtins)
+    return __builtin_strlen(__s);
+#elif _LIBCPP_STD_VER <= 14
----------------
How about
```
#ifndef _LIBCPP_COMPILER_MSVC
return __builtin_strlen(__s);
#else
...
#endif
```


Repository:
  rCXX libc++

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58022/new/

https://reviews.llvm.org/D58022





More information about the libcxx-commits mailing list