[PATCH] libstdc++: Avoid accidental ADL when calling make_reverse_iterator
Jonathan Wakely
jwakely@redhat.com
Tue Mar 23 18:25:05 GMT 2021
On 23/03/21 18:45 +0100, Moritz Sichert via Libstdc++ wrote:
>Thank you!
>
>You are right. The idea was that the test also tests the const overloads of begin() and end() of reverse_view. But the view concept requires movable. Maybe, this should just be
>
>static_assert(std::ranges::range<const decltype(v)>);
>
>instead?
Oops, I mean to delete the second line, not just the 'const' keyword.
But checking that it models range is better.
Also the comment is slightly wrong, it won't call
make_reserve_iterator(const A&) it will call make_reserve_iterator(A*)
or make_reserve_iterator(const A*).
I've committed the attached patch. Thanks again.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 1208 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20210323/5589fd03/attachment-0001.bin>
More information about the Libstdc++
mailing list