From fe41434ed66e679162423eb608df857d844013b8 Mon Sep 17 00:00:00 2001 From: James Sedgwick Date: Mon, 5 Jan 2015 16:44:36 -0800 Subject: [PATCH] fix 4.9 build 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 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 | 1 + folly/test/OptionalTest.cpp | 2 +- folly/wangle/futures/Promise.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/folly/Foreach.h b/folly/Foreach.h index 8f213464..f5fed8bd 100644 --- a/folly/Foreach.h +++ b/folly/Foreach.h @@ -48,6 +48,7 @@ */ #include +#include /* * Shorthand for: diff --git a/folly/test/OptionalTest.cpp b/folly/test/OptionalTest.cpp index 4699f615..d14adcff 100644 --- a/folly/test/OptionalTest.cpp +++ b/folly/test/OptionalTest.cpp @@ -341,7 +341,7 @@ TEST(Optional, Comparisons) { EXPECT_TRUE(6 > boi); boost::optional bob(false); - EXPECT_TRUE(bob); + EXPECT_TRUE((bool)bob); EXPECT_TRUE(bob == false); // well that was confusing EXPECT_FALSE(bob != false); } diff --git a/folly/wangle/futures/Promise.h b/folly/wangle/futures/Promise.h index 31b76cfe..7d8609bc 100644 --- a/folly/wangle/futures/Promise.h +++ b/folly/wangle/futures/Promise.h @@ -17,6 +17,7 @@ #pragma once #include +#include namespace folly { namespace wangle { -- 2.34.1