Title
Add join_view::base() member function
Status
resolved
Section
[range.join.view]
Submitter
United States

Created on 2019-11-06.00:00:00 last changed 41 months ago

Messages

Date: 2020-11-09.22:09:58

Proposed resolution:

Resolved by accepting P1456R1.

Date: 2020-11-09.00:00:00

[ 2020-11-09 Resolved for C++20. Status changed: Tentatively Resolved → Resolved. ]

Date: 2019-12-15.00:00:00

[ 2019-12-16; Casey comments ]

This issue has been resolved by P1456R1 "Move-only views", which added no less than two member functions named "base" to join_view.

Previous resolution [SUPERSEDED]:

This wording is relative to N4835.

  1. Modify [range.join.view], class template join_view synopsis, as indicated:

    […]
    template<input_range R>
      requires viewable_range<R> && constructible_from<V, all_view<R>>
    constexpr explicit join_view(R&& r);
    
    constexpr V base() const;
    
    constexpr auto begin() {
      return iterator<simple-view<V>>{*this, ranges::begin(base_)};
    }
    […]
    
  2. Modify [range.join.view] as indicated:

    template<input_range R>
      requires viewable_range<R> && constructible_from<V, all_view<R>>
    constexpr explicit join_view(R&& r);
    

    -2- Effects: […]

    constexpr V base() const;
    

    -?- Effects: Equivalent to: return base_;

Date: 2019-11-07.08:02:35

[ 2019-11 Status to Ready during Wednesday night issue processing in Belfast. ]

Date: 2019-11-06.00:00:00

Addresses US 293

join_view is missing a base() member for returning the underlying view. All the other range adaptors provide this.

Proposed change:

To the join_view class template add the member:

constexpr V base() const { return base_; }

Jonathan Wakely:

The NB comment says "join_view is missing a base() member for returning the underlying view. All the other range adaptors provide this."

In fact, split_view and istream_view do not provide base() either. Of the views that do define base(), all except all_view do so out-of-line, so the proposed resolution adds it out-of-line too.

History
Date User Action Args
2020-11-09 22:09:58adminsetmessages: + msg11603
2019-12-21 13:59:05adminsetmessages: + msg10894
2019-12-21 13:59:05adminsetstatus: ready -> resolved
2019-11-07 08:02:35adminsetmessages: + msg10773
2019-11-07 08:02:35adminsetstatus: new -> ready
2019-11-06 19:19:36adminsetmessages: + msg10760
2019-11-06 00:00:00admincreate