diff options
author | Patrick Palka <ppalka@redhat.com> | 2020-02-26 12:31:01 -0500 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2020-02-27 12:47:17 -0500 |
commit | ba49e9eb18730cc71e5ffc302092f87ef6821f24 (patch) | |
tree | ee475a61860977eda886a2ecd3e52d191986f9b1 /gcc | |
parent | 10a32d479861c3a39987d3468f6a400e907499a2 (diff) | |
download | gcc-ba49e9eb18730cc71e5ffc302092f87ef6821f24.zip gcc-ba49e9eb18730cc71e5ffc302092f87ef6821f24.tar.gz gcc-ba49e9eb18730cc71e5ffc302092f87ef6821f24.tar.bz2 |
libstdc++: Add missing friend declarations in some range adaptors
Some of the range adaptors have distinct constant and non-constant
iterator/sentinel types, along with converting constructors that can convert a
non-constant iterator/sentinel to a constant iterator/sentinel. This patch adds
the missing appropriate friend declarations in order to make these converting
constructors well formed.
Strictly speaking it seems the friendship relations don't need to go both ways
-- we could get away with declaring e.g. friend _Iterator<false>; instead of
friend _Iterator<!_Const>; but both reference implementations seem to use the
latter symmetric form anyway.
libstdc++-v3/ChangeLog:
* include/std/ranges (transform_view::_Iterator<_Const>): Befriend
_Iterator<!_Const>.
(transform_view::_Sentinel<_Const>): Befriend _Sentinel<!_Const>.
(take_view::_Sentinel<_Const>): Likewise.
(take_while_view::_Sentinel<_Const>): Likewise.
(split_view::_OuterIter<_Const>): Befriend _OuterIter<!_Const>.
* testsuite/std/ranges/adaptors/split.cc: Augment test.
* testsuite/std/ranges/adaptors/take.cc: Augment test.
* testsuite/std/ranges/adaptors/take_while.cc: Augment test.
* testsuite/std/ranges/adaptors/transform.cc: Augment test.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions