This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/23227] SFINAE bug


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]