The sequenced-before relation orders evaluations within one thread. Operations in successive statements are ordered, while operations within one statement are generally unsequenced unless a language rule, such as the built-in comma operator, establishes an order. section 5.3.2
Listing 5.3. Order of evaluation of arguments to a function call is unspecified
#include <iostream>
void foo(int a,int b)
{
std::cout<<a<<","<<b<<std::endl;
}
int get_num()
{
static int i=0;
return ++i;
}
int main()
{
foo(get_num(),get_num()); #1
}
The two calls to get_num() are function arguments whose evaluation order is unspecified, so the output may be 1,2 or 2,1. section 5.3.2
Sequenced-before combines with inter-thread happens-before: if an operation precedes a release operation, and that release synchronizes with an acquire in another thread, the earlier operation happens before accesses after that acquire. This ordering supports safe access to data protected by mutexes and underlies higher-level synchronization facilities. section 5.3.7 section 5.3.2

