Index: uspace/lib/cpp/include/__bits/algorithm.hpp
===================================================================
--- uspace/lib/cpp/include/__bits/algorithm.hpp	(revision d5409daa794d9384555eb540e3baaaa8b6a8600c)
+++ uspace/lib/cpp/include/__bits/algorithm.hpp	(revision 4e841766a5651fa1e08e75de7ce1bdfde08bdc42)
@@ -1110,12 +1110,20 @@
                                  InputIterator2 last2)
     {
+        while ((first1 != last1) && (first2 != last2))
+        {
+            if (*first1 < *first2)
+                return true;
+            if (*first2 < *first1)
+                return false;
+
+            ++first1;
+            ++first2;
+        }
+
         /**
-         * *first1 and *first2 can have different types
-         * so we use a transparent comparator.
+         * Up until now they are same, so we have to check
+         * if we reached the end on one.
          */
-        return lexicographical_compare(
-            first1, last1, first2, last2,
-            less<void>{}
-        );
+        return (first1 == last1) && (first2 != last2);
     }
 
