Unless otherwise specified,
if an exception is thrown in the following algorithms,
objects constructed by a placement new-expression ([expr.new])
are destroyed in an unspecified order
before allowing the exception to propagate.
When new objects are created by
the algorithms specified in [specialized.algorithms],
the lifetime ends for any existing objects
(including potentially-overlapping subobjects [intro.object])
in storage that is reused [basic.life].
Some algorithms specified in [specialized.algorithms]
make use of the following exposition-only function templates:
template<class T>constexprvoid*voidify(T& obj)noexcept{return addressof(obj);
}template<class I>decltype(auto)deref-move(I& it){ifconstexpr(is_lvalue_reference_v<decltype(*it)>)return std::move(*it);
elsereturn*it;
}