libstdc++: Missing constexpr for __gnu_debug::__valid_range etc
commit6f34b9e4f1eb7aa3398aaf135cbb24680eaad1b1
authorJonathan Wakely <jwakely@redhat.com>
Mon, 1 Nov 2021 12:27:43 +0000 (1 12:27 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 1 Nov 2021 21:01:31 +0000 (1 21:01 +0000)
treea2ae7e4a3bc2d5cea04d61d8eb9c9fec115dc8e7
parent09bc98098e4ad474d2ba9da52457b29bbd08874b
libstdc++: Missing constexpr for __gnu_debug::__valid_range etc

The new 25_algorithms/move/constexpr.cc test fails in debug mode,
because the debug assertions use the non-constexpr overloads in
<debug/stl_iterator.h>.

libstdc++-v3/ChangeLog:

* include/debug/stl_iterator.h (__valid_range): Add constexpr
for C++20. Qualify call to avoid ADL.
(__get_distance, __can_advance, __unsafe, __base): Likewise.
* testsuite/25_algorithms/move/constexpr.cc: Also check with
std::reverse_iterator arguments.
libstdc++-v3/include/debug/stl_iterator.h
libstdc++-v3/testsuite/25_algorithms/move/constexpr.cc