1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Function template spreadsort</title> 5<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../../../index.html" title="Boost.Sort"> 8<link rel="up" href="../../../header/boost/sort/spreadsort/spreadsort_hpp.html" title="Header <boost/sort/spreadsort/spreadsort.hpp>"> 9<link rel="prev" href="../../../header/boost/sort/spreadsort/spreadsort_hpp.html" title="Header <boost/sort/spreadsort/spreadsort.hpp>"> 10<link rel="next" href="spreadso_idm45878543863328.html" title="Function template spreadsort"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> 15<td align="center"><a href="../../../../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="../../../header/boost/sort/spreadsort/spreadsort_hpp.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../header/boost/sort/spreadsort/spreadsort_hpp.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="spreadso_idm45878543863328.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="refentry"> 26<a name="boost.sort.spreadsort.spreadso_idm45878543880736"></a><div class="titlepage"></div> 27<div class="refnamediv"> 28<h2><span class="refentrytitle">Function template spreadsort</span></h2> 29<p>boost::sort::spreadsort::spreadsort — Generic <code class="computeroutput">spreadsort</code> variant detecting integer-type elements so call to <code class="computeroutput">integer_sort</code>. </p> 30</div> 31<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> 32<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: <<a class="link" href="../../../header/boost/sort/spreadsort/spreadsort_hpp.html" title="Header <boost/sort/spreadsort/spreadsort.hpp>">boost/sort/spreadsort/spreadsort.hpp</a>> 33 34</span> 35<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> RandomAccessIter<span class="special">></span> 36 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">enable_if_c</span><span class="special"><</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">iterator_traits</span><span class="special"><</span> <span class="identifier">RandomAccessIter</span> <span class="special">></span><span class="special">::</span><span class="identifier">value_type</span> <span class="special">></span><span class="special">::</span><span class="identifier">is_integer</span><span class="special">,</span> <span class="keyword">void</span> <span class="special">></span><span class="special">::</span><span class="identifier">type</span> 37 <span class="identifier">spreadsort</span><span class="special">(</span><span class="identifier">RandomAccessIter</span> first<span class="special">,</span> <span class="identifier">RandomAccessIter</span> last<span class="special">)</span><span class="special">;</span></pre></div> 38<div class="refsect1"> 39<a name="idm45477845105568"></a><h2>Description</h2> 40<p>If the data type provided is an integer, <code class="computeroutput">integer_sort</code> is used. </p> 41<div class="note"><table border="0" summary="Note"> 42<tr> 43<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/src/images/note.png"></td> 44<th align="left">Note</th> 45</tr> 46<tr><td align="left" valign="top"><p>Sorting other data types requires picking between <code class="computeroutput">integer_sort</code>, <code class="computeroutput">float_sort</code> and <code class="computeroutput">string_sort</code> directly, as <code class="computeroutput">spreadsort</code> won't accept types that don't have the appropriate <code class="computeroutput">type_traits</code>. </p></td></tr> 47</table></div> 48<p> 49 50 51 52 53 54 55</p> 56<div class="variablelist"><table border="0" class="variablelist compact"> 57<colgroup> 58<col align="left" valign="top"> 59<col> 60</colgroup> 61<tbody> 62<tr> 63<td><p><span class="term">Parameters:</span></p></td> 64<td><div class="variablelist"><table border="0" class="variablelist compact"> 65<colgroup> 66<col align="left" valign="top"> 67<col> 68</colgroup> 69<tbody> 70<tr> 71<td><p><span class="term"><code class="computeroutput">first</code></span></p></td> 72<td><p>Iterator pointer to first element. </p></td> 73</tr> 74<tr> 75<td><p><span class="term"><code class="computeroutput">last</code></span></p></td> 76<td><p>Iterator pointing to one beyond the end of data.</p></td> 77</tr> 78</tbody> 79</table></div></td> 80</tr> 81<tr> 82<td><p><span class="term">Requires:</span></p></td> 83<td><p>[<code class="computeroutput">first</code>, <code class="computeroutput">last</code>) is a valid range. </p></td> 84</tr> 85<tr> 86<td><p><span class="term">Requires:</span></p></td> 87<td><p><code class="computeroutput">RandomAccessIter</code> <code class="computeroutput">value_type</code> is mutable. </p></td> 88</tr> 89<tr> 90<td><p><span class="term">Requires:</span></p></td> 91<td><p><code class="computeroutput">RandomAccessIter</code> <code class="computeroutput">value_type</code> is <a href="http://en.cppreference.com/w/cpp/concept/LessThanComparable" target="_top">LessThanComparable</a> </p></td> 92</tr> 93<tr> 94<td><p><span class="term">Requires:</span></p></td> 95<td><p><code class="computeroutput">RandomAccessIter</code> <code class="computeroutput">value_type</code> supports the <code class="computeroutput">operator>></code>, which returns an integer-type right-shifted a specified number of bits. </p></td> 96</tr> 97<tr> 98<td><p><span class="term">Postconditions:</span></p></td> 99<td><p>The elements in the range [<code class="computeroutput">first</code>, <code class="computeroutput">last</code>) are sorted in ascending order. </p></td> 100</tr> 101</tbody> 102</table></div> 103</div> 104</div> 105<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 106<td align="left"></td> 107<td align="right"><div class="copyright-footer">Copyright © 2014-2017 Steven 108 Ross, Francisco Tapia, Orson Peters<p> 109 Distributed under the <a href="http://boost.org/LICENSE_1_0.txt" target="_top">Boost 110 Software License, Version 1.0</a>. 111 </p> 112</div></td> 113</tr></table> 114<hr> 115<div class="spirit-nav"> 116<a accesskey="p" href="../../../header/boost/sort/spreadsort/spreadsort_hpp.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../header/boost/sort/spreadsort/spreadsort_hpp.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="spreadso_idm45878543863328.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> 117</div> 118</body> 119</html> 120