Simply, is
&someObject->someAttribute.someMember;
equivalent to
&(someObject->someAttribute.someMember);
or
(&someObject)->someAttribute.someMember;
or
(&(someObject->someAttribute)).someMember;
Or should you really put explicit parenthesis there just to be safe?
It is equivalent to:
The
->and.have equal precedence and are left-associative. The unary-&has lower precedence.If you have very complex expressions, then you should certainly use parentheses to group things and clarify your code. This isn’t particularly complex, though; it is quite common to see code like this in C and C++.