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 to view this page for the latest version.
PrevUpHomeNext

Programming

You only need to include the file boost/sort/sort.hpp to use spinsort.

The spinsort function is in the namespace boost::sort

#include <boost/sort/sort.hpp>


template <class iter_t,  typename compare>
void spinsort (iter_t first, iter_t last, compare comp = compare());

This algorithm uses a comparison object, in the same way as the standard library sort algorithms. If you don't define it, the comparison object defaults to std::less, which uses the < operator internally for comparisons.

This algorithm is exception safe, meaning that, the exceptions generated by the algorithm guarantee the integrity of the objects to sort, but not their relative order. If the exception is generated inside the objects (in the move or copy constructors) the results are undefined.


PrevUpHomeNext