[Bug c++/102419] [11/12 Regression][concepts] [regression] return-type-requirement of "Y<typename T::type>" does not check that T::type actually exists

ppalka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Sep 21 15:18:56 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102419

--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
And similarly for:

  template<class> concept Y = true;
  template<class T> concept X = Y<typename T::type>;
  static_assert(!X<int>);

GCC rejects and Clang/MSVC accept.  IMHO Clang/MSVC are clearly misbehaving
here -- when evaluating the concept-id X<int>, they appear to be substituting
{int} into X's constraint-expression instead of into the normal form of X's
constraint-expression.


More information about the Gcc-bugs mailing list