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

--- Comment #2 from Hubert Tong <hstong at ca dot ibm.com> ---
(In reply to Patrick Palka from comment #1)
> The ttp's constraints can depend on outer template parameters, which I think
> prevents us from being able to check its constraints before instantiation in
> general?
> 
> template <typename T, typename U>
> concept C = T::value;
> 
> template <typename> struct Q;
> 
> template <typename T, template <typename U> requires C<T, U> class TT>
> struct A {
>   TT<int> *p;
> };
> 
> A<int, Q> a;

Good point. That is true. The wording does not actually require doing the check
before instantiation though. What it does require is to perform a check using
the TTP's constraints when the instantiation occurs (if not done earlier).

Reply via email to