Boost logo

Boost Users :

From: François Duranleau (duranlef_at_[hidden])
Date: 2006-01-22 12:26:34


On Sun, 22 Jan 2006, JOAQUIN LOPEZ MU?Z wrote:

> Yep, I see. You're right. Well, you can refer to get<> as follows
>
> boost::tuples::get<N,typename Tuple::inherited>
>
> Note that this is not relying on undocumented implementation,
> so called "const lists" are explained and made public at
>
> http://boost.org/libs/tuple/doc/tuple_advanced_interface.html
>
> So I'd say you can use the former reference to get safely.

That doesn't work. boost::tuples::get has 3 template arguments, not 2. You
need to do this:

boost::tuples::get< N ,
                     typename Tuple::head_type ,
                     typename Tuple::tail_type >

As a matter of fact, you can drop the 'tuples::' as well. Even then, a
problem remains (and the approach I suggested doesn't solve that either):
the overload of the function on the constness of the parameter. So you
have to explicitly cast the function or make a wrapper.

-- 
François Duranleau
LIGUM, Université de Montréal
"Ne me demandez pas comment ça va, car je vous mentirai."
                                                                 - moi-même

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


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