#define ImplBaseRTTI(classname) RuntimeClass classname::rtti(NULL);
#define ImplRTTI(classname, b1) RuntimeClass classname::rtti(&b1::rtti, NULL)
#define ImplRTTI2(classname, b1, b2) RuntimeClass classname::rtti(&b1::rtti, &b2::rtti, NULL)
#define ImplRTTI3(classname, b1, b2, b3) RuntimeClass classname::rtti(&b1::rtti, &b2::rtti, &b3::rtti, NULL)
#define ImplRTTI4(classname, b1, b2, b3, b4) RuntimeClass classname::rtti(&b1::rtti, &b2::rtti, &b3::rtti, &b4::rtti, NULL)
#define ImplRTTI5(classname, b1, b2, b3, b4, b5) RuntimeClass classname::rtti(&b1::rtti, &b2::rtti, &b3::rtti, &b4::rtti, &b5::rtti, NULL)
#define ImplRTTI6(classname, b1, b2, b3, b4, b5, b6) RuntimeClass classname::rtti(&b1::rtti, &b2::rtti, &b3::rtti, &b4::rtti, &b5::rtti, &b6::rtti, NULL)
#define ImplRTTI7(classname, b1, b2, b3, b4, b5, b6, b7) RuntimeClass classname::rtti(&b1::rtti, &b2::rtti, &b3::rtti, &b4::rtti, &b5::rtti, &b6::rtti, &b7::rtti, NULL)
#define ImplRTTI8(classname, b1, b2, b3, b4, b5, b6, b7, b8) RuntimeClass classname::rtti(&b1::rtti, &b2::rtti, &b3::rtti, &b4::rtti, &b5::rtti, &b6::rtti, &b7::rtti, &b8::rtti, NULL)
How can I change this code like
#define ImplRTTI(classname, ...) RuntimeClass classname::rtti(&__VA_ARGS__::rtti, NULL)
It doesn't matter this code needs to become very long or complicated if I can use this macro with only ImplRTTI.