From: Philip Pronin Date: Thu, 14 Aug 2014 07:07:59 +0000 (-0700) Subject: fix build (gtest 1.6 -> 1.7) X-Git-Tag: v0.22.0~406 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4b8e47d6a3e303db0d71e6e931aaf14c4de84b5e;p=folly.git fix build (gtest 1.6 -> 1.7) Summary: D1494614 migrated us to gtest 1.7 which broke multiple builds (with "error: 'tuple' is already declared in this scope" coming from https://code.google.com/p/googletest/source/detail?spec=svn621&r=621). This diff makes folly compatible with both versions of gtest, and the rest of fbcode is now compatible with gtest 1.7. Test Plan: fbconfig -r folly unicorn/diskindex4 && fbmake opt -j32 Reviewed By: jiayan@fb.com Subscribers: fbcode-common-diffs@, chaoyc, search-fbcode-diffs@, sdoroshenko, cold-storage-diffs@, unicorn-diffs@ FB internal diff: D1497389 Tasks: 4909974, 4910547, 4910567, 4909983 --- diff --git a/folly/io/test/CompressionTest.cpp b/folly/io/test/CompressionTest.cpp index 42487012..ea22fca2 100644 --- a/folly/io/test/CompressionTest.cpp +++ b/folly/io/test/CompressionTest.cpp @@ -16,10 +16,8 @@ #include -// Yes, tr1, as that's what gtest requires #include #include -#include #include #include diff --git a/folly/io/test/IOBufTest.cpp b/folly/io/test/IOBufTest.cpp index 71804bb5..b0169370 100644 --- a/folly/io/test/IOBufTest.cpp +++ b/folly/io/test/IOBufTest.cpp @@ -17,9 +17,6 @@ #include #include -// googletest requires std::tr1::tuple, not std::tuple -#include - #include #include #include @@ -836,7 +833,11 @@ class MoveToFbStringTest : public ::testing::TestWithParam> { protected: void SetUp() { - std::tr1::tie(elementSize_, elementCount_, shared_, type_) = GetParam(); + elementSize_ = std::tr1::get<0>(GetParam()); + elementCount_ = std::tr1::get<1>(GetParam()); + shared_ = std::tr1::get<2>(GetParam()); + type_ = std::tr1::get<3>(GetParam()); + buf_ = makeBuf(); for (int i = 0; i < elementCount_ - 1; ++i) { buf_->prependChain(makeBuf());