add static makeFromPath to construct SocketAddress from a unix domain socket path
[folly.git] / folly / sorted_vector_types.h
index 7056ead2d2966c9d690ab90bf1f7c38cce83f83e..54f3cc26ab03b0eee54bbb583604b287d4576b9a 100644 (file)
@@ -167,7 +167,7 @@ namespace detail {
     if (!std::is_sorted(middle, cont.end(), cmp)) {
       std::sort(middle, cont.end(), cmp);
     }
-    if (middle != cont.begin() && cmp(*middle, *(middle - 1))) {
+    if (middle != cont.begin() && !cmp(*(middle - 1), *middle)) {
       std::inplace_merge(cont.begin(), middle, cont.end(), cmp);
       cont.erase(
           std::unique(