I want to define a macro within another macro, in order to save me some repetetive writing.
Currently I have to write this:
MyClass : public Base<MyClass> {
Value<std::string> testString = value<std::string>(&MyClass::testString, "something");
// many more values like this
}
And I want to write something like this, in order to reduce the cluttery of the above:
BASE(MyClass) {
VALUE(std::string, testString, "something");
}
My solution would have been to define two function style macros and BASE
and VALUE
and within BASE
define another constant named __CURRENT_CLASS
that will be used for all calls of VALUE. But how do I define this constant within the BASE
macro?