Title
is-derived-from-view-interface should require that T is derived from view_interface<T>
Status
nad
Section
[range.view]
Submitter
Hewill Kang

Created on 2023-08-22.00:00:00 last changed 13 months ago

Messages

Date: 2023-10-30.16:39:42

Proposed resolution:

This wording is relative to N4958.

  1. Modify [range.view] as indicated:

    template<class T>
      constexpr bool is-derived-from-view-interface = see below;            // exposition only
    template<class T>
      constexpr bool enable_view =
        derived_from<T, view_base> || is-derived-from-view-interface<T>;
    

    -6- For a type T, is-derived-from-view-interface<T> is true if and only if T has exactly one public base class view_interface<TU> for some type U and T has no base classes of type view_interface<UV> for any other type UV.

Date: 2023-10-15.00:00:00

[ 2023-10-30; Reflector poll ]

Set status to Tentatively NAD. The wording correctly handles the case where T derives from Base which derives from view_interface<Base>. We don't want it to only be satisfied for direct inheritance from view_interface<T>, but from any specialization of view_interface. Previously the concept only checked for inheritance from view_base but it was changed when view_interface stopped inheriting from view_base.

Date: 2023-08-22.00:00:00

Currently, the wording of is-derived-from-view-interface only detects whether type T is unambiguously derived from one base class view_interface<U> where U is not required to be T, which is not the intention of CRTP.

History
Date User Action Args
2023-10-30 16:39:42adminsetmessages: + msg13787
2023-10-30 16:39:42adminsetstatus: new -> nad
2023-09-23 14:30:10adminsetmessages: + msg13732
2023-08-22 00:00:00admincreate