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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Haoxin Tu from comment #2)
> (In reply to Andrew Pinski from comment #1)
> > I think it is rejected at instanition time.
> 
> Hi, Andrew. Shouldn't it be rejected at compiling time?

It could be, but that is not required by the C++ standard.

> Is this case similar with bug.cc?

Yes. The ill-formed template is not diagnosed unless you instantiate it. That
is allowed by the standard.

Reply via email to