Title
split_view::base() const & is overconstrained
Status
c++23
Section
[range.split.view]
Submitter
Tim Song

Created on 2021-09-13.00:00:00 last changed 5 months ago

Messages

Date: 2021-10-14.09:56:08

Proposed resolution:

This wording is relative to N4892.

  1. Modify [range.split.view], class template split_view synopsis, as indicated:

    namespace std::ranges {
      template<forward_range V, forward_range Pattern>
        requires view<V> && view<Pattern> &&
                 indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to>
      class split_view : public view_interface<split_view<V, Pattern>> {
      private:
        […]
      public:
        […]
    
        constexpr V base() const& requires copyablecopy_constructible<V> { return base_; }
        constexpr V base() && { return std::move(base_); }
    
        […]
      };
    
Date: 2021-10-14.00:00:00

[ 2021-10-14 Approved at October 2021 virtual plenary. Status changed: Voting → WP. ]

Date: 2021-09-15.00:00:00

[ 2021-09-24; Reflector poll ]

Set status to Tentatively Ready after eight votes in favour during reflector poll.

Date: 2021-09-13.00:00:00

Unlike every other range adaptor, split_view::base() const & is constrained on copyable<V> instead of copy_constructible<V>.

Since this function just performs a copy construction, there is no reason to require all of copyablecopy_constructible is sufficient.

History
Date User Action Args
2023-11-22 15:47:43adminsetstatus: wp -> c++23
2021-10-14 09:56:08adminsetmessages: + msg12141
2021-10-14 09:56:08adminsetstatus: voting -> wp
2021-09-29 12:57:28adminsetstatus: ready -> voting
2021-09-24 17:55:02adminsetmessages: + msg12071
2021-09-24 17:55:02adminsetstatus: new -> ready
2021-09-17 15:12:40adminsetmessages: + msg12034
2021-09-13 00:00:00admincreate