This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/23227] SFINAE bug
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Sep 2005 21:03:36 -0000
- Subject: [Bug c++/23227] SFINAE bug
- References: <20050804093039.23227.sylvain.pion@sophia.inria.fr>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2005-09-14 21:03 -------
Subject: Re: SFINAE bug
"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| I believe the compiler is correct. In order to check whether there
| is a conversion sequence from float to A<C>, it needs to instantiate the
| type, parts of which are declared by incomplete. This should be an error.
I don't think I agree.
Consider
stuct A;
void f(const A&) { }
void f(int) { }
void g()
{
f(2.0);
}
We don't reject the call in g() just because A happens to be incomplete
-- therefore we could not "look into" it for determining whether it
needs an implicit conversion or not. In another words, It is not
clear whether the completeness of A<C> is required in the testcase
submitted.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23227