Skip to content

Commit

Permalink
inplace_function: Add a unit test for https://bugs.llvm.org/show_bug.…
Browse files Browse the repository at this point in the history
…cgi?id=32072

We don't have this bug, but let's make sure we keep it that way.
  • Loading branch information
Quuxplusone committed Feb 4, 2019
1 parent cff3583 commit 136e540
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,14 @@ void test_move_construction_is_noexcept()
EXPECT_EQ(1, moved);
}

// https://bugs.llvm.org/show_bug.cgi?id=32072
struct test_bug_32072_C;
struct test_bug_32072 {
stdext::inplace_function<test_bug_32072_C()> m;
};
static_assert(std::is_copy_constructible<test_bug_32072>::value, "");
static_assert(std::is_nothrow_move_constructible<test_bug_32072>::value, "");

void sg14_test::inplace_function_test()
{
// first set of tests (from Optiver)
Expand Down

0 comments on commit 136e540

Please sign in to comment.