| Summary: | Invalid overload using function pointer | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Marc-André Laperle <malaperle> |
| Component: | cdt-parser | Assignee: | Markus Schorn <mschorn.eclipse> |
| Status: | RESOLVED FIXED | QA Contact: | Markus Schorn <mschorn.eclipse> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug |
| Version: | 8.0 | ||
| Target Milestone: | 8.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
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. |
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