[libcxx-commits] [PATCH] D139555: [libc++] Refactor char_traits

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 8 09:29:59 PST 2022


Mordante accepted this revision.
Mordante added a comment.

LGTM modulo some nits.



================
Comment at: libcxx/include/__string/char_traits.h:215
+    if (__n == 0)
+      return 0;
+    return std::__constexpr_memcmp(__s1, __s2, __n);
----------------
This is odd, I did leave a message here, but it's gone :-/

How about removing this test? I tested in godbolt and Clang and GCC for -O0 and -O2 this generated no code.
(If wanted I can recreate the example in godbolt.)


================
Comment at: libcxx/test/libcxx/strings/c.strings/constexpr.cwchar.compile.pass.cpp:9
+
+// UNSUPPORTED: c++03, c++11
+
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139555



More information about the libcxx-commits mailing list