Community
Participate
Working Groups
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.
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