[libcxx-commits] [PATCH] D101674: [libc++] [LIBCXX-DEBUG-FIXME] Constexpr char_traits::copy mustn't compare unrelated pointers.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Sep 15 11:07:39 PDT 2021
Mordante accepted this revision as: Mordante.
Mordante added a comment.
Nice to see more tests working in debug mode. LGTM!
================
Comment at: libcxx/include/__string:268
{
- _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
+ if (!__libcpp_is_constant_evaluated()) {
+ _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
----------------
WDYT about adding a short comment. `// comparing unrelated pointers is invalid in a constexpr function`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101674/new/
https://reviews.llvm.org/D101674
More information about the libcxx-commits
mailing list