Suppose we have a following function, which is executed by multiple threads at the same time:
void foo()
{
static SomeClass s{get_first_arg(), get_second_arg()};
}
My question is how many times will get_first_arg
and get_second_arg
be executed -- exactly once, or ThreadCount times, or is it unspecified/implementation-defined behavior?