fix 4.9 build
authorJames Sedgwick <jsedgwick@fb.com>
Tue, 6 Jan 2015 00:44:36 +0000 (16:44 -0800)
committerViswanath Sivakumar <viswanath@fb.com>
Tue, 13 Jan 2015 19:01:03 +0000 (11:01 -0800)
Summary:
see https://www.facebook.com/groups/738749156173702/permalink/798168656898418/

I suppressed "comparison between signed and unsigned integer expressions" warnings for this first pass because there a whole lot (dozens) of those. Do we suppress those with 4.8 or something? Never seen the warnings before.

I can't find anything in boost 1.57 docs/changelog indicating why implicit conversion of boost::optional<bool> -> bool doesn't compile anymore, but it doesn't.

Test Plan: fbconfig -r --platform-all gcc-4.9-glibc-2.20 --extra-cxxflags="-Wno-sign-compare" folly && fbmake opt && fbmake runtests_opt

Reviewed By: rhysparry@fb.com

Subscribers: trunkagent, fugalh, folly-diffs@

FB internal diff: D1765093

Signature: t1:1765093:1420500411:062acf841641c7f4142c9b48e8daa45327de6822

folly/Foreach.h
folly/test/OptionalTest.cpp
folly/wangle/futures/Promise.h

index 8f21346438644cbeba3cfe39c08d0ea1058b15e1..f5fed8bd3fa9202407729adb91e29da91906ed68 100644 (file)
@@ -48,6 +48,7 @@
  */
 
 #include <boost/type_traits/remove_cv.hpp>
+#include <type_traits>
 
 /*
  * Shorthand for:
index 4699f615799e4f6d0950a079db66e3ead86c9aed..d14adcfff095df63699c985ea0edc0a68946afed 100644 (file)
@@ -341,7 +341,7 @@ TEST(Optional, Comparisons) {
   EXPECT_TRUE(6 >  boi);
 
   boost::optional<bool> bob(false);
-  EXPECT_TRUE(bob);
+  EXPECT_TRUE((bool)bob);
   EXPECT_TRUE(bob == false); // well that was confusing
   EXPECT_FALSE(bob != false);
 }
index 31b76cfe9da3e12f369430953cd6121c24ce7f09..7d8609bcc81deea2aeffd57323c171c3808daa08 100644 (file)
@@ -17,6 +17,7 @@
 #pragma once
 
 #include <folly/wangle/futures/Try.h>
+#include <functional>
 
 namespace folly { namespace wangle {