make futexWaitUntil tolerant of invalid time_point-s
[folly.git] / folly / Traits.h
index 132e0f2b4a0b9aa73365886f1b5098591bc169f8..14e02f5a1f1e2691d36ad72f9150035e3f3b0e68 100644 (file)
@@ -340,6 +340,13 @@ struct is_negative_impl<T, false> {
   constexpr static bool check(T x) { return false; }
 };
 
+// folly::to integral specializations can end up generating code
+// inside what are really static ifs (not executed because of the templated
+// types) that violate -Wsign-compare so suppress them in order to not prevent
+// all calling code from using it.
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wsign-compare"
+
 template <typename RHS, RHS rhs, typename LHS>
 bool less_than_impl(
   typename std::enable_if<
@@ -371,6 +378,8 @@ bool less_than_impl(
   return false;
 }
 
+#pragma GCC diagnostic pop
+
 template <typename RHS, RHS rhs, typename LHS>
 bool greater_than_impl(
   typename std::enable_if<