C++ Logo

std-discussion

Advanced search

Does the statement "The postfix expression before the dot or arrow is evaluated; 63 the result of that evaluation..." applies to overloaded operators also

From: Sean Mayard <seanmayard_at_[hidden]>
Date: Wed, 10 May 2023 13:35:21 +0530
I came to know that [expr.compound] mainly applies to built in operators.
But, in terms of syntax and evaluation order, [expr.compound] also applies
to overloaded operators.

Then I read expr.ref#1
<https://timsong-cpp.github.io/cppwp/n4868/expr.compound#expr.ref-1> which
states:

*The postfix expression before the dot or arrow is evaluated;63 the result
> of that evaluation, together with the id-expression, determines the result
> of the entire postfix expression.*
>

As you can see the above quoted statement talks about "evaluation". So my
question is does the above quoted statement from [expr.ref#1] apply to
overloaded operators?

Received on 2023-05-10 08:05:34