[forwarded from http://bugs.debian.org/233934] code compiles ok with 3.3.3, not with 3.4 CVS 20040221 g++-3.4 bug-233934.cc bug-233934.cc: In function `void foo() [with T = double]': bug-233934.cc:14: instantiated from here bug-233934.cc:7: error: no matches converting function `bla' to type `void (*)(const double&)' bug-233934.cc:1: error: candidates are: void bla(const char&) bug-233934.cc:2: error: void bla(const int&)
Created attachment 5782 [details] testcase
This is a dup of bug 13549, note the testcases are different but the problem is the same, also note the standard does not say which is right behaviour. *** This bug has been marked as a duplicate of 13549 ***
I don't think this is a duplicate of 13549. For once, Bug 13549 is about the lookup of template-ids, while here we have an unqualified id.
Nathan, can you please comment on this testcase? I can't see how this can be valid since 'bla' is an unqualified non-dependent id which has to be looked up at template definition time. The lookup will found an overload set, and the disambiguation will have to be deferred till instantiation time as the assignment expression is type-dependent. But latest EDG and MSVC71 accepts the code.
This is not a bug. The name is non-dependent, and so name lookup finds only the first two declarations.