Skip to content

Commit

Permalink
Add a failing test case for WG21-SG14#150.
Browse files Browse the repository at this point in the history
  • Loading branch information
Quuxplusone committed Feb 4, 2019
1 parent cff3583 commit e57d7e5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions SG14_test/inplace_function_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,13 @@ void test_move_construction_is_noexcept()
EXPECT_EQ(1, moved);
}

static void test_void_returning_function()
{
stdext::inplace_function<void()> f = []() { return 42; };
f = []() { return 42; };
f();
}

void sg14_test::inplace_function_test()
{
// first set of tests (from Optiver)
Expand Down Expand Up @@ -488,6 +495,7 @@ void sg14_test::inplace_function_test()
test_exception_safety();
test_nullptr();
test_overloaded_operator_new();
test_void_returning_function();
test_move_construction_is_noexcept();
}

Expand Down

0 comments on commit e57d7e5

Please sign in to comment.