[algorithms.parallel.overloads] (original) (raw)

26 Algorithms library [algorithms]

26.3.5 ExecutionPolicy algorithm overloads [algorithms.parallel.overloads]

Parallel algorithms are algorithm overloads.

Each parallel algorithm overload has an additional template type parameter named ExecutionPolicy, which is the first template parameter.

Additionally, each parallel algorithm overload has an additional function parameter of type ExecutionPolicy&&, which is the first function parameter.

[Note 1:

Not all algorithms have parallel algorithm overloads.

— _end note_]

Unless otherwise specified, the semantics of ExecutionPolicy algorithm overloads are identical to their overloads without.

Unless otherwise specified, the complexity requirements of ExecutionPolicy algorithm overloads are relaxed from the complexity requirements of the overloads without as follows: when the guarantee says “at most _expr_” or “exactly expr_” and does not specify the number of assignments or swaps, and_expr is not already expressed with notation, the complexity of the algorithm shall be .

Parallel algorithms shall not participate in overload resolution unlessis_execution_policy_v<remove_cvref_t<ExecutionPolicy>> is true.