Title
common_view's converting constructor is bad, too
Status
c++23
Section
[range.common.view]
Submitter
Casey Carter

Created on 2019-02-20.00:00:00 last changed 12 months ago

Messages

Date: 2020-11-09.21:40:50

Proposed resolution:

This wording is relative to N4849.

  1. Modify [range.common.view], class template common_view synopsis, as indicated:

      
      […]
      constexpr explicit common_view(V r);
      
      template<viewable_range R>
        requires (!common_range<R> && constructible_from<V, all_view<R>>)
      constexpr explicit common_view(R&& r);
      
      constexpr V base() const& requires copy_constructible<V> { return base_; }
      […]
      
    
    […]
    template<viewable_range R>
      requires (!common_range<R> && constructible_from<V, all_view<R>>)
    constexpr explicit common_view(R&& r);
    

    -2- Effects: Initializes base_ with views::all(std::forward<R>(r)).

Date: 2020-11-09.00:00:00

[ 2020-11-09 Approved In November virtual meeting. Status changed: Tentatively Ready → WP. ]

Date: 2020-03-11.00:00:00

[ 2020-03-11 Issue Prioritization ]

Status set to Tentatively Ready after seven positive votes on the reflector.

Date: 2019-02-20.00:00:00

LWG 3280 struck the problematic/extraneous converting constructor templates from the meow_view range adaptor types in the standard library with the exception of common_view. The omission of common_view seems to have been simply an oversight: its converting constructor template is no less problematic or extraneous. We should remove common_view's converting constructor template as well to finish the task. Both cmcstl2 and range-v3 removed the converting constructor template from common_view when removing the other converting constructor templates, so we have implementation experience that this change is good as well as consistent with the general thrust of LWG 3280.

History
Date User Action Args
2023-11-22 15:47:43adminsetstatus: wp -> c++23
2020-11-09 21:40:50adminsetmessages: + msg11562
2020-11-09 21:40:50adminsetstatus: ready -> wp
2020-03-11 18:50:30adminsetmessages: + msg11160
2020-03-11 18:50:30adminsetstatus: new -> ready
2020-02-22 15:00:43adminsetmessages: + msg11143
2019-02-20 00:00:00admincreate