Community
Participate
Working Groups
Using CDT 8.0.0.201104290938 Sample code: class Bar { public: template<typename T> Bar(void (T::*function)()) { } }; class Foo { public: void function() {} void function(int) {} }; int main() { Bar test(&Foo::function); // Invalid overload of 'Foo::function' return 0; } This code compiles without warnings with GCC 4.4 and MSVC 9
Related to bug 85843 maybe?
Thanks for the sample code! Fixed in 8.0 > 20110502.
*** cdt cvs genie on behalf of mschorn *** Bug 344310: Address of overloaded method for instantiation. [*] AST2TemplateTests.java 1.213 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java?root=Tools_Project&r1=1.212&r2=1.213 [*] TemplateArgumentDeduction.java 1.20 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TemplateArgumentDeduction.java?root=Tools_Project&r1=1.19&r2=1.20 [*] CPPSemantics.java 1.202 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java?root=Tools_Project&r1=1.201&r2=1.202
Great thanks! It fixed the problem in my production code too.