Differences in expressions with different expressions in parentheses due to operator precedence.
Here is one way to get a more detailed descriptive type specification:
C: \ my \ forums \ so \ 120> echo struct A {}; using T = int A :: * (); T o; int x = o; > 1.cpp
C: \ my \ forums \ so \ 120> g ++ -c 1.cpp
1.cpp: 1: 48: error: invalid conversion from 'int A :: * (*) ()' to 'int' [-fpermissive]
struct A {}; using T = int A :: * (); T o; int x = o;
^
C: \ my \ forums \ so \ 120> _
So, we see that a variable of type int A::*() is of type int A::* (*)() .
EDIT : I cannot delete this post while it is marked as a solution, so for the record: in the above code, o not a variable. Instead, it is a function declaration. int A::*() is the function type itself, namely the function that returns the data element pointer.
Now we go for coffee & hellip;
source share