From: Brendan M. <cat...@ca...> - 2008-10-19 20:13:06
|
> Out of curiosity: what are you aiming to do ? Metaprogramming via templates > and via OpenC++ are two radically different approaches. Do you want to mix > them ? Or have you ran into limitations of what you can do via template > metaprogramming, and now are hoping to find a way using OpenC++ ? I ran into the problem that there's no way to get a list at compile time (or even run time for that matter) of the members of a class. Nor is there any way to operate on types in place. I'd like to be able to create something like decorators in python that operate on function and class definitions in place where: @MyDecorator class MyClass { ... }; translates into class MyClass_{ ... }; typedef MyDecorator<MyClass_>::type MyClass; Or @MyDecorator int f() { ... } translates into int f_() { ... } void f() { return MyDecorator<f_>::value(); } So for instance, I could have a decorator that performs logging (although I'd need some kind of stringize for that for that as well). Probably this isn't the right tool for that. Especially since it seems like it would be hard to use in production if I can't use the stl and boost. Thanks anyway, Brendan |