]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Rename C++20 Customization Point Objects
authorJonathan Wakely <jwakely@redhat.com>
Wed, 6 Sep 2023 12:21:57 +0000 (13:21 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 7 Sep 2023 07:05:51 +0000 (08:05 +0100)
commitfaea9d92db9a339f5c2cf949e4890947287d7ef9
treea3b817c0276157e27407e72b8546c67336d491f5
parent9f41791eff82d5f41f16204cf092b7888b6c7a8d
libstdc++: Rename C++20 Customization Point Objects

This makes the naming of the CPO types and namespaces simpler and more
consistent. With this change the string "cust" won't appear in
diagnostics related to these CPOs, which avoids confusion about what it
means (customization? customer?). Users don't really need to care that
these are called "customization point objects", so don't show them the
string "cust". Names like "__imove::_IterMove" are preferable to names
like "__cust_imove::_IMove" as the former is more obviously related to
the public API "ranges::iter_move".

Instead of a plethora of inline namespaces for all the different CPO
objects, define them all in an inline namespace called _Cpo (which isn't
shown to users anyway, unlike the types of those objects).

libstdc++-v3/ChangeLog:

* include/bits/iterator_concepts.h (ranges::__cust_imove):
Rename to ranges::__imove.
(_IMove): Rename to _IterMove.
(ranges::__cust_iswap): Rename to ranges::__iswap.
(ranges::__cust): Rename to ranges::_Cpo.
(ranges::__cust_access): Rename to ranges::__access.
* include/bits/ranges_base.h (ranges::__cust_access): Rename to
ranges::__access.
(ranges::__cust): Rename to ranges::_Cpo.
* include/std/concepts (ranges::__cust_swap):  Rename to
ranges::__swap.
(ranges::__cust): Rename to ranges::_Cpo.
* libsupc++/compare (__cmp_cust): Rename to __compare.
(__cmp_algo): Rename to _Cpo.
libstdc++-v3/include/bits/iterator_concepts.h
libstdc++-v3/include/bits/ranges_base.h
libstdc++-v3/include/std/concepts
libstdc++-v3/libsupc++/compare