[libcxx-commits] [PATCH] D115795: [libc++] Add GCC workaround in std::char_traits<char>::length()

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Dec 15 09:38:41 PST 2021


Mordante added inline comments.


================
Comment at: libcxx/include/__string:342
+    static inline size_t _LIBCPP_CONSTEXPR_AFTER_CXX14 length(const char_type* __s)  _NOEXCEPT {
+#ifdef _LIBCPP_COMPILER_GCC
+    if (__libcpp_is_constant_evaluated()) {
----------------
Please add a comment why this is needed and link to the GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70816
This makes it easier to test later whether it's fixed by GCC.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115795



More information about the libcxx-commits mailing list