lemon/radix_sort.h
changeset 1162 881e4168c65f
parent 1092 dceba191c00d
equal deleted inserted replaced
6:d80a6802d1e6 7:c230eb40309d
   326       if (first == last) return;
   326       if (first == last) return;
   327       typedef typename std::iterator_traits<Iterator>::value_type Key;
   327       typedef typename std::iterator_traits<Iterator>::value_type Key;
   328       typedef std::allocator<Key> Allocator;
   328       typedef std::allocator<Key> Allocator;
   329       Allocator allocator;
   329       Allocator allocator;
   330 
   330 
   331       int length = std::distance(first, last);
   331       int length = static_cast<int>(std::distance(first, last));
   332       Key* buffer = allocator.allocate(2 * length);
   332       Key* buffer = allocator.allocate(2 * length);
   333       try {
   333       try {
   334         bool dir = true;
   334         bool dir = true;
   335         std::copy(first, last, buffer);
   335         std::copy(first, last, buffer);
   336         for (int i = 0; i < int(sizeof(Value)) - 1; ++i) {
   336         for (int i = 0; i < int(sizeof(Value)) - 1; ++i) {