From 55d0f32fce1f1c021c03922520760bafcaec6b18 Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Fri, 18 Nov 2016 21:34:19 -0800 Subject: [PATCH] Workaround a bug resolving decltype'd locals in lambdas Summary: Then it's time to get food. The bug report linked in the comment has more details. Reviewed By: yfeldblum Differential Revision: D4209389 fbshipit-source-id: 87e72691555992bdf964b0ded1173daadcedffa4 --- folly/futures/test/InterruptTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/folly/futures/test/InterruptTest.cpp b/folly/futures/test/InterruptTest.cpp index 5c599b0a..4b9f5ccc 100644 --- a/folly/futures/test/InterruptTest.cpp +++ b/folly/futures/test/InterruptTest.cpp @@ -22,12 +22,12 @@ using namespace folly; TEST(Interrupt, raise) { - std::runtime_error eggs("eggs"); + using eggs_t = std::runtime_error; Promise p; p.setInterruptHandler([&](const exception_wrapper& e) { - EXPECT_THROW(e.throwException(), decltype(eggs)); + EXPECT_THROW(e.throwException(), eggs_t); }); - p.getFuture().raise(eggs); + p.getFuture().raise(eggs_t("eggs")); } TEST(Interrupt, cancel) { -- 2.34.1