http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51336

--- Comment #3 from Daniel Krügler <daniel.kruegler at googlemail dot com> 
2011-11-29 07:08:45 UTC ---
(In reply to comment #1)
> When you instantiate A<double>, the declaration of the template constructor 
> is 
> also instantiated, but at that point A<double> is an incomplete type.

I just recognize that the last part of this is a bit misleading, please read
this as:

"When you instantiate A<double>, the declaration of the template constructor is 
also instantiated, but this turns out to be an ill-formed signature"

The argument in regard to type-completeness was intended to point to the
library specification, which requires A<double> to be complete, which means
that A<double> may be instantiated including it's member declarations, which
again is the cause of the error, because we have no sfinae situation here.

In regard to the __is_abstract builtin question it seems that in simple cases
like these (no dependent base classes involved), it may be possible to
implement the intrinsic without instantiating A<double>, but maybe the current
behavior is actually better, because it makes portable programming easier;-)

Reply via email to