Boost logo

Boost Users :

From: Chris Weed (chrisweed_at_[hidden])
Date: 2007-03-28 19:36:28


On 3/28/07, Tobias Schwinger <tschwinger_at_[hidden]> wrote:
> Christian Henning wrote:
> > Hi there, I'm trying to find a solution for looking for type vector
> > containing a specific type. On another thread I was suggested to use
> > at_c within the find_if algorithm. Unfortunately the code doesn't
> > compile.
>
> Placeholder substitution won't work in templates taking non-type
> arguments, such as at_c.
>
> > typedef mpl::find_if<mat, is_same<mpl::at_c<mpl::_1,1>, int> >::type iter;
>
> Try using 'at' and 'int_':
>
> typedef find_if<mat, is_same<at<_1,int_<1> >, int> >::type iter;
>
> Regards,
> Tobias
>

I am curious why at_c doesn't do the same thing. Shouldn't these be equivalent.
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