Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Function template spreadsort

boost::sort::spreadsort::spreadsort — Generic spreadsort variant detecting integer-type elements so call to integer_sort.

Synopsis

// In header: <boost/sort/spreadsort/spreadsort.hpp>


template<typename RandomAccessIter> 
  boost::enable_if_c< std::numeric_limits< typename std::iterator_traits< RandomAccessIter >::value_type >::is_integer, void >::type 
  spreadsort(RandomAccessIter first, RandomAccessIter last);

Description

Generic spreadsort variant detecting string element type so call to string_sort for std::wstrings.

Generic spreadsort variant detecting string element type so call to string_sort for std::strings.

Generic spreadsort variant detecting float element type so call to float_sort.

If the data type provided is an integer, integer_sort is used.

[Note] Note

Sorting other data types requires picking between integer_sort, float_sort and string_sort directly, as spreadsort won't accept types that don't have the appropriate type_traits.

If the data type provided is a float or castable-float, float_sort is used.

[Note] Note

Sorting other data types requires picking between integer_sort, float_sort and string_sort directly, as spreadsort won't accept types that don't have the appropriate type_traits.

If the data type provided is a string, string_sort is used.

[Note] Note

Sorting other data types requires picking between integer_sort, float_sort and string_sort directly, as spreadsort won't accept types that don't have the appropriate type_traits.

If the data type provided is a wstring, string_sort is used.

[Note] Note

Sorting other data types requires picking between integer_sort, float_sort and string_sort directly, as spreadsort won't accept types that don't have the appropriate type_traits. Also, 2-byte wide-characters are the limit above which string_sort is inefficient, so on platforms with wider characters, this will not accept wstrings.

Parameters:

first

Iterator pointer to first element.

Iterator pointer to first element.

Iterator pointer to first element.

Iterator pointer to first element.

last

Iterator pointing to one beyond the end of data.

Iterator pointing to one beyond the end of data.

Iterator pointing to one beyond the end of data.

Iterator pointing to one beyond the end of data.

Requires:

[first, last) is a valid range.

RandomAccessIter value_type is mutable.

RandomAccessIter value_type is LessThanComparable

RandomAccessIter value_type supports the operator>>, which returns an integer-type right-shifted a specified number of bits.

Requires:

[first, last) is a valid range.

RandomAccessIter value_type is mutable.

RandomAccessIter value_type is LessThanComparable

RandomAccessIter value_type supports the operator>>, which returns an integer-type right-shifted a specified number of bits.

Requires:

[first, last) is a valid range.

RandomAccessIter value_type is mutable.

RandomAccessIter value_type is LessThanComparable

RandomAccessIter value_type supports the operator>>, which returns an integer-type right-shifted a specified number of bits.

Requires:

[first, last) is a valid range.

RandomAccessIter value_type is mutable.

RandomAccessIter value_type is LessThanComparable

RandomAccessIter value_type supports the operator>>, which returns an integer-type right-shifted a specified number of bits.

Postconditions:

The elements in the range [first, last) are sorted in ascending order.

Postconditions:

The elements in the range [first, last) are sorted in ascending order.

Postconditions:

The elements in the range [first, last) are sorted in ascending order.

Postconditions:

The elements in the range [first, last) are sorted in ascending order.


PrevUpHomeNext