Title
Ambiguity with requires-clause and operator-function-id
Status
open
Section
11.4.8.3 [class.conv.fct]
Submitter
Richard Smith

Created on 2021-12-09.00:00:00 last changed 1 month ago

Messages

Date: 2021-12-09.00:00:00

An ambiuity can occur with a requires-clause that ends in an operator-function-id:

  template<typename T> requires T::operator int
  const // part of operator-type-id or return type?
  unsigned f();

  template<typename T> requires T::operator int
  [[attr]] // appertains to type int or to declaration of g?
  void g();

Such cases are always ill-formed, because they involve an atomic constraint of non-bool type.

History
Date User Action Args
2021-12-09 00:00:00admincreate