Boost logo

Boost Users :

From: Markus Werle (yg-boost-users_at_[hidden])
Date: 2003-02-25 03:49:59


David Abrahams wrote:

> Markus Werle <yg-boost-users_at_[hidden]> writes:

>> Q3: (OT) Is there a mpl-equivalent to run-time case?
>
> :-)
>
> Aleksey and I have been discussing some shorthands for
>
> if (c1) then t1
> else if (c2) then t2
> else if (c3) then t3
> ...
> else if (c4) then t4
>
> but that's not quite the same as a case statement.

A std::map equivalent would help here a lot.
It should be possible to search within a typelist of
std::pair<condition, type> ...
Unfortunately I am still stumbling through the mpl
source [getting mad about all those
WORKAROUND_FOR(STUPID_COMPILER_VENDOR)]

Could You please give me an idea how to
search within such a typelist?

Markus

 


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