// inside what are really static ifs (not executed because of the templated
// types) that violate -Wsign-compare and/or -Wbool-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"
+FOLLY_PUSH_WARNING
+FOLLY_GCC_DISABLE_WARNING(sign-compare)
#if __GNUC_PREREQ(5, 0)
-#pragma GCC diagnostic ignored "-Wbool-compare"
+FOLLY_GCC_DISABLE_WARNING(bool-compare)
#endif
+FOLLY_MSVC_DISABLE_WARNING(4388) // sign-compare
+FOLLY_MSVC_DISABLE_WARNING(4804) // bool-compare
template <typename RHS, RHS rhs, typename LHS>
bool less_than_impl(LHS const lhs) {
lhs > rhs;
}
-#pragma GCC diagnostic pop
+FOLLY_POP_WARNING
} // namespace detail {
} // namespace folly
+// Assume nothing when compiling with MSVC.
+#ifndef _MSC_VER
// gcc-5.0 changed string's implementation in libgcc to be non-relocatable
#if __GNUC__ < 5
FOLLY_ASSUME_FBVECTOR_COMPATIBLE_3(std::basic_string)
// Boost
FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1(boost::shared_ptr)
+#endif
#define FOLLY_CREATE_HAS_MEMBER_TYPE_TRAITS(classname, type_name) \
template <typename T> \