This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51336] [C++11] is_abstract and sfinae
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 29 Nov 2011 07:08:45 +0000
- Subject: [Bug c++/51336] [C++11] is_abstract and sfinae
- Auto-submitted: auto-generated
- References: <bug-51336-4@http.gcc.gnu.org/bugzilla/>
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;-)