[libcxx-commits] [libcxx] [libc++] constexpr deque (PR #129368)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 11 04:09:37 PDT 2026


================
@@ -2230,7 +2369,7 @@ deque<_Tp, _Allocator>::__move_and_check(iterator __f, iterator __l, iterator __
       __bs = __n;
       __fe = __fb + __bs;
     }
-    if (__fb <= __vt && __vt < __fe)
+    if (std::__is_pointer_in_range(std::__to_address(__fb), std::__to_address(__fe), std::__to_address(__vt)))
----------------
frederick-vs-ja wrote:

Previous comparisons might compare pointers to different storage instances, which was constexpr-unfriendly.

https://github.com/llvm/llvm-project/pull/129368


More information about the libcxx-commits mailing list