[specialized.algorithms.general] (original) (raw)

26 Algorithms library [algorithms]

26.11.1 General [specialized.algorithms.general]

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.

Some algorithms specified in [specialized.algorithms]make use of the following exposition-only function templates:template<class T> constexpr void* voidify(T& obj) noexcept { return addressof(obj);} template<class I> decltype(auto) deref-move(I& it) { if constexpr (is_lvalue_reference_v<decltype(*it)>) return std::move(*it);else return *it;}