
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Chris Weed
Hi, I am trying to use the preprocessor iteration ability to create typedef permutations.
I want to do something like use the following set of types TYPE1: char int float TYPE2: char int float double
to generate permutations of MyClass
such as typedef MyClass
Mycc; typedef MyClass Myci; typedef MyClass Mycf; ...
Creating the permutations is easy, but you can't automatically extract the first
character of an identifier (e.g. 'char' is an identifier to the preprocessor) to
generate the "unique" typedef name. The best that you can do is either pass it
along as a separate field (what the code below does) or provide a way to obtain
it through some kind of type registration.
Regards,
Paul Mensonides
#include