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

--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Here's a testcase that seems to argue for including the class constraints in
the implicit guide's constraints (which already contain the rewritten
constraints of the constructor):

template<class T>
struct A {
  static_assert(!__is_same(T, void));
  static constexpr bool value = true;
};

template<class T> requires (!__is_same(T, void))
struct B {
  B(T*) requires A<T>::value; // #1
  B(T);
};

void* p;
using type = decltype(B(p));
using type = B<void*>;

By not doing so we end up checking the two sets of constraints (the class's and
the constructor's) "out of order", which causes a hard error during constraint
checking of the guide for #1.

Reply via email to