13 Feb
2008
13 Feb
'08
1:25 a.m.
Stjepan Rajko wrote:
On Feb 12, 2008 3:08 PM, e r
wrote: Hi,
I have the following:
template<typename T> class A: public std::unary_function
&, void>{ public: typedef typename std::unary_function &, void> parent_type; typedef typename parent_type::argument_type argument_type; void operator()(argument_type t)const{ t.get<0>(); //error: expected primary-expression before ')' token t.get<1>(); //error: expected primary-expression before ')' token }; };
Similar code without the template (i.e. fix say T = double) works fine.
I'm taking a wild guess here not knowing what you're running this on (and I really haven't looked into your code much), but try:
t.template get<0>(); t.template get<1>();
Was that it?
Stjepan
It compiles w/o error. Thanks!