From: Christopher Dykes Date: Sat, 19 Nov 2016 05:34:19 +0000 (-0800) Subject: Workaround a bug resolving decltype'd locals in lambdas X-Git-Tag: v2016.11.21.00^0 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=55d0f32fce1f1c021c03922520760bafcaec6b18;p=folly.git 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 --- 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) {