Can one assume in unevaluated context, that (::new (std::declval< void * >()) T())->~T()
is semantically (in sense of noexcept
, but not in sense of type of expression) equivalent to simple T()
? Assume that neither global, nor class-scope operator new
are overloaded, if it mutters much.
Often in type traits T()
used inside operator noexcept()
to determine whether only the separate constructor is noexcept
or not. Surely it is wrong.
To prevent the loss of generality one can assume that T()
here is either a calling of a default constructor or of any other constructor.