| Summary: | Problems with const template argument | ||
|---|---|---|---|
| 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, yevshif |
| Version: | 8.0 | ||
| Target Milestone: | 8.0.1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Added testcase, fixed in 8.0.1 > 20110720. *** cdt git genie on behalf of 351609 ***
Bug 351609: Adjust parameter types in instantiated function type.
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=d226e960f9c1b40edd2dadefa005d092d1831fdf
*** cdt git genie on behalf of 351609 ***
Bug 351609: Adjust parameter types in instantiated function type.
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=f05e59801e199a0b51c06ad0c348da062f7194dd
|
Using CDT8.0.0.201107060210 template<typename Arg> class Callback { public: Callback(void (*function)(Arg arg)) { } }; void Subscribe(const Callback<const int>& callback){} void CallMe(const int){} int main() { Subscribe(Callback<const int>(&CallMe)); // invalid arguments, symbol not resolved, here return 0; } If I extract the callback to a variable then pass it to Subscribe, the problems disappear. If I replace 'const int' for 'int', the problems disappear.