|
Boost Users : |
From: e r (erwann.rogard_at_[hidden])
Date: 2008-02-12 20:25:45
Stjepan Rajko wrote:
> On Feb 12, 2008 3:08 PM, e r <erwann.rogard_at_[hidden]> wrote:
>> Hi,
>>
>> I have the following:
>>
>> template<typename T>
>> class A: public std::unary_function<const boost::tuple<double,const
>> T&>&, void>{
>> public:
>> typedef typename std::unary_function<const boost::tuple<double,const
>> T&>&, 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!
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net