Move bits from N4258. Mark vector's move-constructor unconditionally noexcept in C++1z
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242148 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user