This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-12-19


2961. Checking of ill-formed types in constraint-expressions

Section: 13.5  [temp.constr]     Status: open     Submitter: CWG     Date: 2024-11-18

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?