]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Use function object for __decay_copy helper
authorJonathan Wakely <jwakely@redhat.com>
Tue, 15 Jun 2021 13:39:02 +0000 (14:39 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 15 Jun 2021 17:20:06 +0000 (18:20 +0100)
commitcb326a6442f09cb36b05ce556fc91e10bfeb0cf6
tree2b96c508b05ad227431a64ab325bef2c1c080a70
parent6d43ec50966cafb339eb6a370a5d767a24f673e1
libstdc++: Use function object for __decay_copy helper

By changing __cust_access::__decay_copy from a function template to a
function object we avoid ADL. That means it's fine to call it
unqualified (the compiler won't waste time doing ADL in associated
namespaces, and won't try to complete associated types).

This also makes some other minor simplications to other concepts for the
[range.access] CPOs.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

* include/bits/iterator_concepts.h (__cust_access::__decay_copy):
Replace with function object.
(__cust_access::__member_begin, ___cust_access::_adl_begin): Use
__decay_copy unqualified.
* include/bits/ranges_base.h (__member_end, __adl_end):
Likewise. Use __range_iter_t for type of ranges::begin.
(__member_rend): Use correct value category for rbegin argument.
(__member_data): Use __decay_copy unqualified.
(__begin_data): Use __range_iter_t for type of ranges::begin.
libstdc++-v3/include/bits/iterator_concepts.h
libstdc++-v3/include/bits/ranges_base.h