[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

Danila Kutenin via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Feb 10 21:19:04 PST 2019


danlark marked an inline comment as done.
danlark added inline comments.


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


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

https://reviews.llvm.org/D58022





More information about the libcxx-commits mailing list