Hi! i have a nested struct and i'd like to have a pointer-to-member to one of the nested member:
is it legal?
struct InnerStruct
{
bool c;
};
struct MyStruct {
bool t;
bool b;
InnerStruct inner;
};
this:
MyStruct mystruct;
//...
bool MyStruct::* toto = &MyStruct::b;
is ok but:
bool MyStruct::* toto = &MyStruct::inner.c;
is not. any idea?
thanks
Here are some details Yes it is &MyStruct::b and not mystruct::b; The code is from a custom RTTI/Property system. For each specified class we keep an array of "Property", including a Ptr-to-member It is used like this:
//somewhere else in code...
( myBaseClassWithCustomRTTIPointer)->* toto = true;