Difference between execution policies and when to use them : <p>I noticed that a majority (if not all) functions in <code>&lt;algorithm&gt;</code> are getting one or more extra overloads. All of these extra overloads add a specific new parameter, for example, <code>std::for_each</code> goes from:</p>

<pre><code>template&lt; class InputIt, class UnaryFunction &gt;
UnaryFunction for_each( InputIt first, InputIt last, UnaryFunction f );
</code></pre>

<p>to:</p>

<pre><code>template&lt; class ExecutionPolicy, class InputIt, class UnaryFunction2 &gt;
void for_each( ExecutionPolicy&amp;&amp; policy, InputIt first, InputIt last, UnaryFunction2 f );
</code></pre>

<p>What effect does this extra <code>ExecutionPolicy</code> have on these functions?</p>

<p>What are the differences between:</p>

<ul>
<li><code>std::execution::seq</code></li>
<li><code>std::execution::par</code></li>
<li><code>std::execution::par_unseq</code></li>
</ul>

<p>And when to use one or the other?</p>
