|
Boost Users : |
From: David Abrahams (dave_at_[hidden])
Date: 2005-03-10 22:43:10
"Bruce Trask" <Bruce.Trask_at_[hidden]> writes:
> 1. ( ) text/plain (*) text/html
>
> Hi,
>
> I have a mpl::vector of types. Each of the types in the vector have
> themselves another nested mpl::vector that is a sequence of enums. I have
> include the code below.
>
> What I am trying to do is take the original sequence and make a new sequence
> based on the predicate that only elements with certains enums in their
> nested vector be included in the new sequence. I have included more notes
> in the embedded comments.
>
> I was thinking of using mpl::copy_if but am having trouble getting the
> predicate right.
>
> Wanted to know if anyone could steer me in the right direction. I am trying
> to fill in the ??? below. I am having trouble writing a custom predicate.
>
> Thanks in advance.
>
> Regards,
>
> Bruce
>
> #include <string>
>
> #include <iostream>
>
> #include <boost/mpl/vector.hpp>
Hints:
#1 don't use tabs in your code samples; they get stripped by most mailers
#2 fix your newlines
#3 post your code as an attachment and it will always come through
correctly.
How does what I've done below look to you?
-- Dave Abrahams Boost Consulting www.boost-consulting.com
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