![]() |
Boost Users : |
From: Chris Weed (chrisweed_at_[hidden])
Date: 2007-01-20 18:01:02
It appears another option is as follows:
result_of::value_of<result_of::begin<VectorType>::type>::type
or for an arbitrary index N
enum { N=2 };
result_of::value_of<result_of::advance_c<result_of::begin<VectorType>::type,N>::type>::type
Chris
On 1/20/07, Sohail Somani <s.somani_at_[hidden]> wrote:
>
>
>
> All the at functions would return you a reference, not a copy anyway. So
> they are doing the right thing. Stripping the reference is the right thing
> to do.
>
> -----Original Message-----
> From: boost-users-bounces_at_[hidden] on behalf of
> Chris Weed
> Sent: Sat 1/20/2007 9:31 AM
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] [fusion][mpl] Get type from fusion
> sequenceusingmpl::at_c
>
> I tried this, but it seems to be the result of the at_c function which
> is a reference. I would like to get the type of the element. I suppose
> I could use a meta-function to strip off the &, but it seems like the
> mpl version of at_c should do what I want.
> Chris
>
> On 1/18/07, Sohail Somani <s.somani_at_[hidden]> wrote:
> >
> >
> >
> > -----Original Message-----
> > From: boost-users-bounces_at_[hidden] on behalf of
> > Chris Weed
> >
> > Hi,
> > I am trying to get the type of the first element in a fusion vector
> > using mpl::at_c. This seems simple enough.
> >
> > ----
> >
> > I'm a noob to fusion but do you want fusion::result_of::at_c instead?
> > _______________________________________________
> > 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 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