looped typedefs and/or class definitions
Some of my code includes the following (abbreviated):
typedef Edge
"martin f krafft" wrote:
Some of my code includes the following (abbreviated): typedef Edge
Edge00000000Type; typedef Edge Edge00000001Type; typedef Edge Edge00000010Type; typedef Edge Edge00000011Type; //... you can imagine where this is going. Instead of 32 typedefs, I was wondering if it weren't possible to use the compiler to achieve the above.
Similarly, let's say I wanted to define a set of empty classes:
class AB : public A, B {}; class AC : public A, C {}; class BC : public B, C {};
can I use the compiler to automate this?
Boost.Preprocessor: http://www.boost.org/libs/preprocessor/doc/index.html Introduction to the library: http://boost-consulting.com/tmpbook/preprocessor.html It takes some effort to get used to using the library but it is worth of the time, IMHO. /Pavel
participants (2)
-
martin f krafft
-
Pavel Vozenilek