Remove unecessary iostream include
[folly.git] / folly / Traits.h
index ece58c30b60c0e0b9de212479cf4702796f5451e..999a7a257d5238f721d1322ea5bc45b5f030c1f8 100644 (file)
@@ -423,11 +423,13 @@ struct is_negative_impl<T, false> {
 // 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) {
@@ -445,7 +447,7 @@ bool greater_than_impl(LHS const lhs) {
     lhs > rhs;
 }
 
-#pragma GCC diagnostic pop
+FOLLY_POP_WARNING
 
 } // namespace detail {
 
@@ -578,6 +580,8 @@ constexpr initlist_construct_t initlist_construct{};
 
 } // 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)
@@ -591,6 +595,7 @@ FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1(std::function)
 
 // Boost
 FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1(boost::shared_ptr)
+#endif
 
 #define FOLLY_CREATE_HAS_MEMBER_TYPE_TRAITS(classname, type_name) \
   template <typename T> \