27 Algorithms library [algorithms]

27.11 Specialized <memory> algorithms [specialized.algorithms]

27.11.1 General [specialized.algorithms.general]

The contents specified in [specialized.algorithms] are declared in the header <memory>.
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.
[Note 1:
When invoked on ranges of potentially-overlapping subobjects ([intro.object]), the algorithms specified in [specialized.algorithms] result in undefined behavior.
— end note]
Some algorithms specified in [specialized.algorithms] make use of the exposition-only function voidify: template<class T> constexpr void* voidify(T& obj) noexcept { return const_cast<void*>(static_cast<const volatile void*>(addressof(obj))); }