From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2003-04-11 16:42:24
Paul Mensonides wrote:
> BTW, it is easy to compare identifiers/keywords provided that you
> have 1) a strict preprocessor, and 2) a simple "traits" macro for
> each identifier that you might want to compare. For example, if
> you want to be able to compare identifiers for "Aleksey" and "Paul,"
> you need these to macros (abbreviating macro prefix to "_" for
> // custom user-defined macros:
> #define _COMPARE_Aleksey(x) x
> #define _COMPARE_Paul(x) x
> _COMPARE(abc, Aleksey) // 0
> _COMPARE(Paul, Aleksey) // 0
> _COMPARE(Aleksey, abc) // 0
> _COMPARE(Aleksey, Aleksey) // 1
That's exactly the facility I would be completely happy with!
Can we make it work for some of the broken preprocessors? Personally, I care
only about MSVC and Metrowerks.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk