<h2>Requires<aclass="headerlink"href="#requires"title="Permalink to this headline">¶</a></h2>
<divclass="line-block">
<divclass="line">The elements e of [first,last) are partitioned with respect to the expressions <ttclass="docutils literal"><spanclass="pre">e</span><spanclass="pre"><</span><spanclass="pre">value</span></tt> and <ttclass="docutils literal"><spanclass="pre">!(value</span><spanclass="pre"><</span><spanclass="pre">e)</span></tt> or <ttclass="docutils literal"><spanclass="pre">comp(e,</span><spanclass="pre">value)</span></tt> and <ttclass="docutils literal"><spanclass="pre">!comp(value,</span><spanclass="pre">e)</span></tt>.</div>
<divclass="line">Also, for all elements e of [first,last), <ttclass="docutils literal"><spanclass="pre">e</span><spanclass="pre"><</span><spanclass="pre">value</span></tt> implies <ttclass="docutils literal"><spanclass="pre">!(value</span><spanclass="pre"><</span><spanclass="pre">e)</span></tt> or <ttclass="docutils literal"><spanclass="pre">comp(e,</span><spanclass="pre">value)</span></tt> implies <ttclass="docutils literal"><spanclass="pre">!comp(value,</span><spanclass="pre">e)</span></tt>.</div>
</div>
</div>
<divclass="section"id="returns">
<h2>Returns<aclass="headerlink"href="#returns"title="Permalink to this headline">¶</a></h2>
<divclass="line-block">
<divclass="line">true if there is an iterator i in the range [first,last) that satisfies the corresponding conditions: <ttclass="docutils literal"><spanclass="pre">!(*i</span><spanclass="pre"><</span><spanclass="pre">value)</span><spanclass="pre">&&</span><spanclass="pre">!(value</span><spanclass="pre"><</span><spanclass="pre">*i)</span></tt> or <ttclass="docutils literal"><spanclass="pre">comp(*i,</span><spanclass="pre">value)</span><spanclass="pre">&&</span><spanclass="pre">comp(value,</span><spanclass="pre">*i)</span></tt>.</div>
</div>
</div>
<divclass="section"id="examples">
<h2>Examples<aclass="headerlink"href="#examples"title="Permalink to this headline">¶</a></h2>
<spanclass="n">static_assert</span><spanclass="p">(</span><spanclass="n">result</span><spanclass="p">,</span><spanclass="s">"found 5 by binary search."</span><spanclass="p">);</span>
</pre></div>
</div>
</div>
<divclass="section"id="complexity">
<h2>Complexity<aclass="headerlink"href="#complexity"title="Permalink to this headline">¶</a></h2>
<divclass="line-block">
<divclass="line">At most <ttclass="docutils literal"><spanclass="pre">log2(last</span><spanclass="pre">-</span><spanclass="pre">first)</span><spanclass="pre">+</span><spanclass="pre">O(1)</span></tt> comparisons.</div>
<divclass="line">Recursive function invocations in <em>O(logN)</em> (logarithmic) depth.</div>
</div>
</div>
<divclass="section"id="header">
<h2>Header<aclass="headerlink"href="#header"title="Permalink to this headline">¶</a></h2>