[libcxx-commits] [PATCH] D115986: [libc++] Allow __move_constexpr to work with unrelated pointers

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Dec 20 08:06:46 PST 2021


philnik added a comment.

In D115986#3202891 <https://reviews.llvm.org/D115986#3202891>, @ldionne wrote:

> What do you mean "with unrelated pointers"? Can you explain what breaks when you use `std::copy` to implement `__move_constexpr`?

The problem isn't `std::copy`. The problem is `__s1 < __s2`, which only works if you have two pointers that were derived by `__s2 = __s1 + c`. Otherwise the constant evaluator will fail, because there is no rule to determine which pointer is larger.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115986



More information about the libcxx-commits mailing list