Boost logo

Boost Users :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2007-06-15 21:49:40


"Server Levent Yilmaz" <leventyilmaz_at_[hidden]> wrote

> I have a related, simpler question:
>
> Given a tuple (or any other container) with arbitrary elements,
> is there a way to determine if an element is SPECIAL_TEXT
> or some other text. For example given, ( a, b, SPECIAL_TEXT, c, d ),
> can we construct (0, 0, 1, 0, 0)?

If you know all the possibilities in advance, you can do something like:

#define LOOKING_FOR_SPECIAL_TEXT 1
#define LOOKING_FOR_a 0
#define LOOKING_FOR_b 0
#define LOOKING_FOR_c 0
#define LOOKING_FOR_d 0

and then transform the sequence using concatination LOOKING_FOR_ with the
current item.

Regards,
Arkadiy


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