15 #ifndef BOOST_STRING_SORT_HPP
16 #define BOOST_STRING_SORT_HPP
21 #include <boost/static_assert.hpp>
22 #include <boost/sort/spreadsort/detail/constants.hpp>
23 #include <boost/sort/spreadsort/detail/string_sort.hpp>
72 template <
class RandomAccessIter,
class Un
signed_
char_type>
73 inline void string_sort(RandomAccessIter first, RandomAccessIter last,
74 Unsigned_char_type unused)
77 if (last - first < detail::min_sort_size)
78 std::sort(first, last);
125 template <
class RandomAccessIter>
126 inline void string_sort(RandomAccessIter first, RandomAccessIter last)
128 unsigned char unused =
'\0';
182 template <
class RandomAccessIter,
class Compare,
class Un
signed_
char_type>
184 RandomAccessIter last, Compare comp, Unsigned_char_type unused)
187 if (last - first < detail::min_sort_size)
188 std::sort(first, last, comp);
241 template <
class RandomAccessIter,
class Compare>
243 RandomAccessIter last, Compare comp)
245 unsigned char unused =
'\0';
300 template <
class RandomAccessIter,
class Get_
char,
class Get_length>
301 inline void string_sort(RandomAccessIter first, RandomAccessIter last,
302 Get_char get_character, Get_length length)
305 if (last - first < detail::min_sort_size)
306 std::sort(first, last);
310 while (!length(*first)) {
372 template <
class RandomAccessIter,
class Get_char,
class Get_length,
374 inline void string_sort(RandomAccessIter first, RandomAccessIter last,
375 Get_char get_character, Get_length length, Compare comp)
378 if (last - first < detail::min_sort_size)
379 std::sort(first, last, comp);
383 while (!length(*first)) {
388 get_character((*first), 0));
445 template <
class RandomAccessIter,
class Get_char,
class Get_length,
448 RandomAccessIter last, Get_char get_character, Get_length length, Compare comp)
451 if (last - first < detail::min_sort_size)
452 std::sort(first, last, comp);
456 while (!length(*(--last))) {
463 get_character((*last), 0));
Definition: float_sort.hpp:27
void string_sort(RandomAccessIter first, RandomAccessIter last, Get_char get_character, Get_length length, Compare comp)
String sort algorithm using random access iterators, wraps using default of unsigned char...
Definition: string_sort.hpp:374
void string_sort(RandomAccessIter first, RandomAccessIter last, Unsigned_char_type unused)
String sort algorithm using random access iterators, allowing character-type overloads. (All variants fall back to std::sort if the data size is too small, < detail::min_sort_size).
Definition: string_sort.hpp:73
void reverse_string_sort(RandomAccessIter first, RandomAccessIter last, Compare comp, Unsigned_char_type unused)
String sort algorithm using random access iterators, allowing character-type overloads.
Definition: string_sort.hpp:183
void reverse_string_sort(RandomAccessIter first, RandomAccessIter last, Get_char get_character, Get_length length, Compare comp)
Reverse String sort algorithm using random access iterators.
Definition: string_sort.hpp:447