Commit 55d0f32f authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot

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
parent da873b7b
...@@ -22,12 +22,12 @@ ...@@ -22,12 +22,12 @@
using namespace folly; using namespace folly;
TEST(Interrupt, raise) { TEST(Interrupt, raise) {
std::runtime_error eggs("eggs"); using eggs_t = std::runtime_error;
Promise<Unit> p; Promise<Unit> p;
p.setInterruptHandler([&](const exception_wrapper& e) { 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) { TEST(Interrupt, cancel) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment