Skip to content

Commit c3c6c39

Browse files
burblebeetkoeppe
authored andcommitted
LWG3848 adjacent_view, adjacent_transform_view and slide_view missing base accessor
1 parent 99abacd commit c3c6c39

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

source/ranges.tex

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10573,6 +10573,9 @@
1057310573
adjacent_view() requires @\libconcept{default_initializable}@<V> = default;
1057410574
constexpr explicit adjacent_view(V base);
1057510575

10576+
constexpr V base() const & requires @\libconcept{copy_constructible}@<V> { return @\exposid{base_}@; }
10577+
constexpr V base() && { return std::move(@\exposid{base_}@); }
10578+
1057610579
constexpr auto begin() requires (!@\exposconcept{simple-view}@<V>) {
1057710580
return @\exposid{iterator}@<false>(ranges::begin(@\exposid{base_}@), ranges::end(@\exposid{base_}@));
1057810581
}
@@ -11214,6 +11217,9 @@
1121411217
adjacent_transform_view() = default;
1121511218
constexpr explicit adjacent_transform_view(V base, F fun);
1121611219

11220+
constexpr V base() const & requires @\libconcept{copy_constructible}@<@\exposid{InnerView}@> { return @\exposid{inner_}@.base(); }
11221+
constexpr V base() && { return std::move(@\exposid{inner_}@).base(); }
11222+
1121711223
constexpr auto begin() {
1121811224
return @\exposid{iterator}@<false>(*this, @\exposid{inner_}@.begin());
1121911225
}
@@ -12680,6 +12686,9 @@
1268012686
public:
1268112687
constexpr explicit slide_view(V base, range_difference_t<V> n);
1268212688

12689+
constexpr V base() const & requires @\libconcept{copy_constructible}@<V> { return @\exposid{base_}@; }
12690+
constexpr V base() && { return std::move(@\exposid{base_}@); }
12691+
1268312692
constexpr auto begin()
1268412693
requires (!(@\exposconcept{simple-view}@<V> && @\exposconcept{slide-caches-nothing}@<const V>));
1268512694
constexpr auto begin() const requires @\exposconcept{slide-caches-nothing}@<const V>;

0 commit comments

Comments
 (0)