|
Boost : |
From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2004-08-26 21:02:06
> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Arkadiy Vertleyb
> I am trying to find a way to implement something like a
> preprocessing-time map. As far as I understand, the task is
> trivial if "keys" contain only one
> token:
> However, this approach obviously brakes when keys contain
> more than one token, like "key 1" (or, to be closer to the
> real problem, "unsigned int").
It isn't usually the case that preprocessor metaprogramming is used to do type
computation. It is possible, of course, given enough scaffolding, but templates
are much more naturally suited to it. Types as values just doesn't scale with
the preprocessor. It is common, OTOH, to generate a template-based solution
with the preprocessor. Thus, what exactly are you trying to do?
> So I am wonderring if there is any facility in the
> preprocessor (or in the
> Boost.Preprocessor) that would allow me to do this.
There isn't a facility to do it directly in the pp-lib, but it is possible.
Regards,
Paul Mensonides
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk