Title
Questionable type-dependency of concept-ids
Status
c++20
Section
13.8.3.3 [temp.dep.expr]
Submitter
Hubert Tong

Created on 2019-02-03.00:00:00 last changed 47 months ago

Messages

Date: 2020-02-15.00:00:00

Proposed resolution (February, 2020):

  1. Change 13.8.3.3 [temp.dep.expr] paragraph 3 as follows:

  2. An id-expression is type-dependent if it is not a concept-id and it contains

    • ...

  3. Change 13.8.3.4 [temp.dep.constexpr] paragraph 3 as follows:

  4. An id-expression is value-dependent if:

    • it is a concept-id and any of its arguments are dependent,

    • it is type-dependent,

    • ...

Date: 2020-02-15.00:00:00

[Accepted at the February, 2020 (Prague) meeting.]

The rules for type-dependency do not appear to take the bool type associated with concept-ids into account. For example:

  template <typename T> concept C = true;
  template <typename T> struct A;
  template <> struct A<bool> { using type = bool; };

  template <typename T>
  void f(A<decltype(C<T>)>::type); // error: needs typename to avoid vexing parse
History
Date User Action Args
2020-12-15 00:00:00adminsetmessages: + msg6478
2019-02-03 00:00:00admincreate