Index: lemon/radix_sort.h
===================================================================
--- lemon/radix_sort.h	(revision 559)
+++ lemon/radix_sort.h	(revision 1042)
@@ -35,4 +35,10 @@
   namespace _radix_sort_bits {
 
+    template <typename Iterator>
+    bool unitRange(Iterator first, Iterator last) {
+      ++first;
+      return first == last;
+    }
+
     template <typename Value>
     struct Identity {
@@ -61,7 +67,4 @@
       std::iter_swap(first, last);
       ++first;
-      if (!(first < last)) {
-        return first;
-      }
       while (true) {
         while (!(functor(*first) & mask)) {
@@ -72,5 +75,5 @@
           --last;
         }
-        if (!(first < last)) {
+        if (unitRange(last, first)) {
           return first;
         }
@@ -98,7 +101,4 @@
       std::iter_swap(first, last);
       ++first;
-      if (!(first < last)) {
-        return first;
-      }
       while (true) {
         while (functor(*first) < 0) {
@@ -109,5 +109,5 @@
           --last;
         }
-        if (!(first < last)) {
+        if (unitRange(last, first)) {
           return first;
         }
@@ -120,5 +120,5 @@
     void radixIntroSort(Iterator first, Iterator last,
                         Functor functor, Value mask) {
-      while (mask != 0 && last - first > 1) {
+      while (mask != 0 && first != last && !unitRange(first, last)) {
         Iterator cut = radixSortPartition(first, last, functor, mask);
         mask >>= 1;
