Clang type substitution for concepts is too eager (original) (raw)

GCC test concepts4.C fails when it should pass. Apparently this part of temp.constr points out that the type substitution happens later than when we're applying it (cc @zygoloid in case I botched the explanation).

template struct A { static const int x = 42; };

template concept A42 = A::x == 42; template concept Void = __is_same_as(Tv, void); template <class Tb, class Ub> concept A42b = Void || A42; template concept R42c = A42b<Tc, Tc&>;

static_assert (R42c);