diff --git a/folly/test/FileUtilTest.cpp b/folly/test/FileUtilTest.cpp index 23a49f96faf1d4762bee91dc54f92a376f4c6bbf..d79dfd246d8f343bc24ca98ed334e234c32e9f6b 100644 --- a/folly/test/FileUtilTest.cpp +++ b/folly/test/FileUtilTest.cpp @@ -159,7 +159,7 @@ TEST_F(FileUtilTest, read) { for (auto& p : readers_) { std::string out(in_.size(), '\0'); EXPECT_EQ(p.first, wrapFull(p.second, 0, &out[0], out.size())); - if (p.first != (typeof(p.first))(-1)) { + if (p.first != (decltype(p.first))(-1)) { EXPECT_EQ(in_.substr(0, p.first), out.substr(0, p.first)); } } @@ -169,7 +169,7 @@ TEST_F(FileUtilTest, pread) { for (auto& p : readers_) { std::string out(in_.size(), '\0'); EXPECT_EQ(p.first, wrapFull(p.second, 0, &out[0], out.size(), off_t(42))); - if (p.first != (typeof(p.first))(-1)) { + if (p.first != (decltype(p.first))(-1)) { EXPECT_EQ(in_.substr(0, p.first), out.substr(0, p.first)); } } @@ -230,7 +230,7 @@ TEST_F(FileUtilTest, readv) { auto iov = buf.iov(); EXPECT_EQ(p.first, wrapvFull(p.second, 0, iov.data(), iov.size())); - if (p.first != (typeof(p.first))(-1)) { + if (p.first != (decltype(p.first))(-1)) { EXPECT_EQ(in_.substr(0, p.first), buf.join().substr(0, p.first)); } } @@ -258,7 +258,7 @@ TEST_F(FileUtilTest, preadv) { auto iov = buf.iov(); EXPECT_EQ(p.first, wrapvFull(p.second, 0, iov.data(), iov.size(), off_t(42))); - if (p.first != (typeof(p.first))(-1)) { + if (p.first != (decltype(p.first))(-1)) { EXPECT_EQ(in_.substr(0, p.first), buf.join().substr(0, p.first)); } } diff --git a/folly/test/ThreadLocalTest.cpp b/folly/test/ThreadLocalTest.cpp index 230aaa3340119da0348712248465b8d7e8f1d5d0..aaa3794d452ab0f1523450a14219600a51a403b9 100644 --- a/folly/test/ThreadLocalTest.cpp +++ b/folly/test/ThreadLocalTest.cpp @@ -85,7 +85,7 @@ TEST(ThreadLocalPtr, CustomDeleterOwnershipTransfer) { auto deleter = [](Widget* ptr) { Widget::customDeleter(ptr, TLPDestructionMode::THIS_THREAD); }; - std::unique_ptr<Widget, typeof(deleter)> source(new Widget(), deleter); + std::unique_ptr<Widget, decltype(deleter)> source(new Widget(), deleter); std::thread([&w, &source]() { w.reset(std::move(source)); w.get()->val_ += 10;