Boost logo

Boost :

From: Frank Laub (frank.laub_at_[hidden])
Date: 2005-12-07 17:24:26


On 12/7/05, Job Mulder <Job_at_[hidden]> wrote:
>
> It looks nice, but does it also work with other structures than strings?
> i.e.
>
> BOOST_ENUM(id,
> (ab_device)("device for your abs", /*activation code*/ 13,
> /*typical % of time used*/ 0.0) (pc_device)("personal computer",
> /*activation code*/ 42, /*typical % of time used*/ 100.0)
> )
>
>
Unfortunately, you can't put commas into one of the elements because then
the BOOST_PP stuff thinks that you've no longer got a sequence data type,
now you've got a tuple or some kind. This really looks like you'd like to
have an arbitrary type to be used for each element of the enum. I'd really
like that too, but haven't figured out a way to accomplish this. Also, we'd
have to figure out what the best API would be to pull these values out.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk