From 6012fe9abb1f01b1b5b4ca908464804c21ff8602 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 19 Jan 2019 10:05:35 +0000 Subject: Vendor import of libc++ trunk r351319 (just before the release_80 branch point): https://llvm.org/svn/llvm-project/libcxx/trunk@351319 --- .../func.wrap.func/func.wrap.func.con/copy_move.pass.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con') diff --git a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp index faf4f11573d1..e9b399a2edd2 100644 --- a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp +++ b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp @@ -12,7 +12,7 @@ // class function // function(const function& f); -// function(function&& f); +// function(function&& f); // noexcept in C++20 #include #include @@ -109,6 +109,10 @@ int main() assert(globalMemCounter.checkOutstandingNewEq(1)); assert(f.target()); assert(f.target() == 0); + LIBCPP_ASSERT_NOEXCEPT(std::function(std::move(f))); +#if TEST_STD_VER > 17 + ASSERT_NOEXCEPT(std::function(std::move(f))); +#endif std::function f2 = std::move(f); assert(A::count == 1); assert(globalMemCounter.checkOutstandingNewEq(1)); @@ -129,6 +133,10 @@ int main() assert(A::count == 1); assert(f.target() == nullptr); assert(f.target()); + LIBCPP_ASSERT_NOEXCEPT(std::function(std::move(f))); +#if TEST_STD_VER > 17 + ASSERT_NOEXCEPT(std::function(std::move(f))); +#endif std::function f2(std::move(f)); assert(A::count == 1); assert(f2.target() == nullptr); @@ -144,6 +152,10 @@ int main() std::function f(p); assert(f.target() == nullptr); assert(f.target()); + LIBCPP_ASSERT_NOEXCEPT(std::function(std::move(f))); +#if TEST_STD_VER > 17 + ASSERT_NOEXCEPT(std::function(std::move(f))); +#endif std::function f2(std::move(f)); assert(f2.target() == nullptr); assert(f2.target()); -- cgit v1.3