Files
2025-10-25 03:02:53 +03:00

2.1 KiB

[specialized.algorithms.general]

26 Algorithms library [algorithms]

26.11 Specialized algorithms [specialized.algorithms]

26.11.1 General [specialized.algorithms.general]

1

#

The contents specified in [specialized.algorithms] are declared in the header .

2

#

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.

3

#

[Note 1:

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].

— end note]

4

#

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