On Tue, 15 Jun 2021 at 22:33, Jonathan Wakely wrote:
>
> On Tue, 15 Jun 2021 at 21:32, Tim Song wrote:
> >
> > CPOs are specified as actual semiregular function objects that can be
> > copied and constructed freely, so it seems a bit hostile to make them
> > final/non-addressable? (It's debatable w
On Tue, 15 Jun 2021 at 21:32, Tim Song wrote:
>
> CPOs are specified as actual semiregular function objects that can be
> copied and constructed freely, so it seems a bit hostile to make them
> final/non-addressable? (It's debatable whether the type of a CPO is a
> type "specified in the C++ standa
CPOs are specified as actual semiregular function objects that can be
copied and constructed freely, so it seems a bit hostile to make them
final/non-addressable? (It's debatable whether the type of a CPO is a
type "specified in the C++ standard library" for which [derivation]/4
would apply.)
On
This restricts the API of the CPOs and other function objects so they
cannot be misused by deriving from them or taking their addresses.
Signed-off-by: Jonathan Wakely
libstdc++-v3/ChangeLog:
* include/bits/ranges_base.h (ranges::begin, ranges::end)
(ranges::cbegin, ranges::cend