struct A { int x; };
int main() {
int A::* pt = &A::x;
return 0;
}
what does int A::*
mean exactly? I have never seen C++ syntax like this.
struct A { int x; };
int main() {
int A::* pt = &A::x;
return 0;
}
what does int A::*
mean exactly? I have never seen C++ syntax like this.
Just like other traits, you specify the template argument and use the value
member.
std::is_member_object_pointer<decltype(pa) >::value
what does
int A::*
mean exactly?
That is a type declaration of a member object pointer to an int member of the class A.