diff options
Diffstat (limited to 'test/std')
-rw-r--r-- | test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp | 5 | ||||
-rw-r--r-- | test/std/containers/sequences/vector/vector.cons/move_noexcept.pass.cpp | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp b/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp index ab32bd067..132186b55 100644 --- a/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp +++ b/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp @@ -43,7 +43,12 @@ int main() } { typedef std::vector<bool, some_alloc<bool>> C; + // In C++17, move constructors for allocators are not allowed to throw +#if TEST_STD_VER > 14 + static_assert( std::is_nothrow_move_constructible<C>::value, ""); +#else static_assert(!std::is_nothrow_move_constructible<C>::value, ""); +#endif } #endif } diff --git a/test/std/containers/sequences/vector/vector.cons/move_noexcept.pass.cpp b/test/std/containers/sequences/vector/vector.cons/move_noexcept.pass.cpp index 46cad9925..b7bbfaa42 100644 --- a/test/std/containers/sequences/vector/vector.cons/move_noexcept.pass.cpp +++ b/test/std/containers/sequences/vector/vector.cons/move_noexcept.pass.cpp @@ -44,7 +44,12 @@ int main() } { typedef std::vector<MoveOnly, some_alloc<MoveOnly>> C; + // In C++17, move constructors for allocators are not allowed to throw +#if TEST_STD_VER > 14 + static_assert( std::is_nothrow_move_constructible<C>::value, ""); +#else static_assert(!std::is_nothrow_move_constructible<C>::value, ""); +#endif } #endif } |