Boost logo

Boost Users :

From: Chris Weed (chrisweed_at_[hidden])
Date: 2007-10-18 10:12:36


On 10/18/07, Vinzenz 'evilissimo' Feenstra <evilissimo_at_[hidden]> wrote:
> Chris Weed schrieb:
> > Hi,
> > I can't figure out why the following code generates a compile error
> > with gcc 3.4:
> >
> > #include <boost/mpl/vector_c.hpp>
> > #include <boost/mpl/at.hpp>
> > #include <boost/tuple/tuple.hpp>
> >
> > template<typename E,typename T>
> > typename boost::tuples::element<boost::mpl::at_c<E,0>::type::value,T>::type
> > foo(E e,T t)
> > {
> > return t.get<0>();
> > }
> >
> > int main()
> > {
> > typedef boost::mpl::vector_c<int,0,1> elements;
> > boost::tuple<int> t(1);
> > foo(elements(),t);
> > }
> >
> Hi,
>
> shouldn't it be:
>
> template<typename E,typename T>
> typename boost::tuples::element<typename
> boost::mpl::at_c<E,0>::type::value,T>::type
> foo(E e,T t)
> {
> return t.get<0>();
> }
>
> Regards,
> Vinzenz

That doesn't work either.
Chris


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