diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2018-11-20 20:37:07 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2018-11-20 20:37:07 +0000 |
commit | 859bf40761b31a687d575d2ae463b20ee7e7c2d7 (patch) | |
tree | b1c24e6df6b3f2ef2fb300fb4002ca026ec6c849 /libcxx/test/std/utilities | |
parent | 8ab0924ab42ef78a869b9738fed27d3bb3e2af5f (diff) | |
download | bcm5719-llvm-859bf40761b31a687d575d2ae463b20ee7e7c2d7.tar.gz bcm5719-llvm-859bf40761b31a687d575d2ae463b20ee7e7c2d7.zip |
Mark P0771 as complete; we already did this - I just added tests to be sure
llvm-svn: 347343
Diffstat (limited to 'libcxx/test/std/utilities')
-rw-r--r-- | libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp index faf4f11573d..e9b399a2edd 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp @@ -12,7 +12,7 @@ // class function<R(ArgTypes...)> // function(const function& f); -// function(function&& f); +// function(function&& f); // noexcept in C++20 #include <functional> #include <memory> @@ -109,6 +109,10 @@ int main() assert(globalMemCounter.checkOutstandingNewEq(1)); assert(f.target<A>()); assert(f.target<int(*)(int)>() == 0); + LIBCPP_ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f))); +#if TEST_STD_VER > 17 + ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f))); +#endif std::function<int(int)> 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<A>() == nullptr); assert(f.target<Ref>()); + LIBCPP_ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f))); +#if TEST_STD_VER > 17 + ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f))); +#endif std::function<int(int)> f2(std::move(f)); assert(A::count == 1); assert(f2.target<A>() == nullptr); @@ -144,6 +152,10 @@ int main() std::function<int(int)> f(p); assert(f.target<A>() == nullptr); assert(f.target<Ptr>()); + LIBCPP_ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f))); +#if TEST_STD_VER > 17 + ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f))); +#endif std::function<int(int)> f2(std::move(f)); assert(f2.target<A>() == nullptr); assert(f2.target<Ptr>()); |