Title
Checking of ill-formed types in constraint-expressions
Status
open
Section
13.5 [temp.constr]
Submitter
CWG

Created on 2024-11-18.00:00:00 last changed 2 weeks ago

Messages

Date: 2024-11-18.00:00:00

There is implementation divergence in the handling of the following example:

  template <typename T>
  concept C = true;

  template <typename T>
  void f() requires C<T *> {
   //
  }

  void g() {
   f<int &>();
  }

Is the constraint not satisfied because an intermediate invalid type "pointer to reference to T" is formed? Or is the constraint satisfied because T is never actually used?

History
Date User Action Args
2024-11-18 00:00:00admincreate