Taking as example
void f(B b, A&& a) {...}
B g(B b, A a) {...}
int main() {
B b;
A a;
f(g(b, a), std::move(a));
}
I presume this would be valid code seeing as an std::move()
is merely a static_cast
and from what I gather all function parameters are evaluated first (with no order guarantee) before copied / moved (which I assume is part of the function call not parameter evaluation) to the function's context.
operator-precedence
tag on SO is really messed up. It has a bad definition and is aliased toevaluation-order
, which is what's really relevant here. – Prolongate