diff options
Diffstat (limited to 'test/std/thread/futures/futures.shared_future/copy_assign.pass.cpp')
| -rw-r--r-- | test/std/thread/futures/futures.shared_future/copy_assign.pass.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/std/thread/futures/futures.shared_future/copy_assign.pass.cpp b/test/std/thread/futures/futures.shared_future/copy_assign.pass.cpp index 3f9e945dddaf..abb9928e88a1 100644 --- a/test/std/thread/futures/futures.shared_future/copy_assign.pass.cpp +++ b/test/std/thread/futures/futures.shared_future/copy_assign.pass.cpp @@ -15,10 +15,13 @@ // class shared_future<R> // shared_future& operator=(const shared_future& rhs); +// noexcept in C++17 #include <future> #include <cassert> +#include "test_macros.h" + int main() { { @@ -27,6 +30,9 @@ int main() std::shared_future<T> f0 = p.get_future(); std::shared_future<T> f; f = f0; +#if TEST_STD_VER > 14 + static_assert(noexcept(f = f0), "" ); +#endif assert(f0.valid()); assert(f.valid()); } |
