Consider the code
auto p = new T( U(std::move(v)) );
The initializer is then U(std::move(v))
. Let's assume that T( U(std::move(v)) )
does not throw. If the initializer is evaluated after the underlying memory allocation, the code is then strong-exception-safe. Otherwise, it is not. Had memory allocation thrown, v
would have already been moved. I'm therefore interested in the relative order between memory allocation and initializer evaluation. Is it defined, unspecified, or what?