forked from OSchip/llvm-project
[libcxx] [test] Fix Clang -Wunused-local-typedef, part 1/3.
Guard typedefs and static_asserts with _LIBCPP_VERSION. test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp Additionally deal with conditional compilation. test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp Additionally deal with typedefs used by other typedefs. Fixes D29135. llvm-svn: 294154
This commit is contained in:
parent
8eb1f315ac
commit
03fe6e2da2
|
@ -37,14 +37,16 @@ struct some_comp
|
|||
int main()
|
||||
{
|
||||
typedef std::pair<const MoveOnly, MoveOnly> V;
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::map<MoveOnly, MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
|
||||
static_assert(!std::is_nothrow_default_constructible<C>::value, "");
|
||||
|
|
|
@ -43,8 +43,10 @@ int main()
|
|||
typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
|
||||
static_assert(std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -45,10 +45,12 @@ int main()
|
|||
typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
|
|
|
@ -34,19 +34,21 @@ struct some_comp
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
typedef std::pair<const MoveOnly, MoveOnly> V;
|
||||
{
|
||||
typedef std::map<MoveOnly, MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
|
||||
|
|
|
@ -99,14 +99,16 @@ int main()
|
|||
typedef std::map<MoveOnly, MoveOnly> C;
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
{
|
||||
typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
|
||||
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
|
@ -129,11 +131,12 @@ int main()
|
|||
typedef std::map<MoveOnly, MoveOnly, some_comp2<MoveOnly>, some_alloc2<V>> C;
|
||||
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{ // NOT always equal allocator, nothrow swap for comp
|
||||
typedef std::map<MoveOnly, MoveOnly, some_comp2<MoveOnly>, some_alloc3<V>> C;
|
||||
LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
|
@ -37,14 +37,16 @@ struct some_comp
|
|||
int main()
|
||||
{
|
||||
typedef std::pair<const MoveOnly, MoveOnly> V;
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::multimap<MoveOnly, MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
|
||||
static_assert(!std::is_nothrow_default_constructible<C>::value, "");
|
||||
|
|
|
@ -43,8 +43,10 @@ int main()
|
|||
typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
|
||||
static_assert(std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::multimap<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -45,10 +45,12 @@ int main()
|
|||
typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::multimap<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
|
|
|
@ -34,19 +34,21 @@ struct some_comp
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
typedef std::pair<const MoveOnly, MoveOnly> V;
|
||||
{
|
||||
typedef std::multimap<MoveOnly, MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::multimap<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
|
||||
|
|
|
@ -99,14 +99,16 @@ int main()
|
|||
typedef std::multimap<MoveOnly, MoveOnly> C;
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
{
|
||||
typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::multimap<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
|
||||
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
|
@ -129,10 +131,11 @@ int main()
|
|||
typedef std::multimap<MoveOnly, MoveOnly, some_comp2<MoveOnly>, some_alloc2<V>> C;
|
||||
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{ // NOT always equal allocator, nothrow swap for comp
|
||||
typedef std::multimap<MoveOnly, MoveOnly, some_comp2<MoveOnly>, some_alloc3<V>> C;
|
||||
LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -36,14 +36,16 @@ struct some_comp
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::multiset<MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::multiset<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::multiset<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_default_constructible<C>::value, "");
|
||||
|
|
|
@ -42,8 +42,10 @@ int main()
|
|||
typedef std::multiset<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
|
||||
static_assert(std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::multiset<MoveOnly, some_comp<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -44,10 +44,12 @@ int main()
|
|||
typedef std::multiset<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::multiset<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::multiset<MoveOnly, some_comp<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
|
|
|
@ -34,18 +34,20 @@ struct some_comp
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::multiset<MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::multiset<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::multiset<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::multiset<MoveOnly, some_comp<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
|
||||
|
|
|
@ -98,14 +98,16 @@ int main()
|
|||
typedef std::multiset<MoveOnly> C;
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::multiset<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
{
|
||||
typedef std::multiset<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::multiset<MoveOnly, some_comp<MoveOnly>> C;
|
||||
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
|
@ -128,10 +130,11 @@ int main()
|
|||
typedef std::multiset<MoveOnly, some_comp2<MoveOnly>, some_alloc2<MoveOnly>> C;
|
||||
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{ // NOT always equal allocator, nothrow swap for comp
|
||||
typedef std::multiset<MoveOnly, some_comp2<MoveOnly>, some_alloc3<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -36,14 +36,16 @@ struct some_comp
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::set<MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::set<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::set<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_default_constructible<C>::value, "");
|
||||
|
|
|
@ -42,8 +42,10 @@ int main()
|
|||
typedef std::set<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
|
||||
static_assert(std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::set<MoveOnly, some_comp<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -44,10 +44,12 @@ int main()
|
|||
typedef std::set<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::set<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::set<MoveOnly, some_comp<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
|
|
|
@ -34,18 +34,20 @@ struct some_comp
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::set<MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::set<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::set<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::set<MoveOnly, some_comp<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
|
||||
|
|
|
@ -98,14 +98,16 @@ int main()
|
|||
typedef std::set<MoveOnly> C;
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::set<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
{
|
||||
typedef std::set<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::set<MoveOnly, some_comp<MoveOnly>> C;
|
||||
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
|
@ -128,11 +130,12 @@ int main()
|
|||
typedef std::set<MoveOnly, some_comp2<MoveOnly>, some_alloc2<MoveOnly>> C;
|
||||
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{ // NOT always equal allocator, nothrow swap for comp
|
||||
typedef std::set<MoveOnly, some_comp2<MoveOnly>, some_alloc3<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
|
@ -25,8 +25,10 @@
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::priority_queue<MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -24,8 +24,10 @@
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::queue<MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -24,8 +24,10 @@
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::queue<MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -24,8 +24,10 @@
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::stack<MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -24,8 +24,10 @@
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::stack<MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -32,14 +32,16 @@ struct some_alloc
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::deque<MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::deque<MoveOnly, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::deque<MoveOnly, other_allocator<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_default_constructible<C>::value, "");
|
||||
|
|
|
@ -42,8 +42,10 @@ int main()
|
|||
typedef std::deque<MoveOnly, other_allocator<MoveOnly>> C;
|
||||
static_assert(std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -42,12 +42,14 @@ int main()
|
|||
typedef std::deque<MoveOnly, test_allocator<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::deque<MoveOnly, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -32,18 +32,20 @@ struct some_alloc
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::deque<MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::deque<MoveOnly, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::deque<MoveOnly, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
|
||||
|
|
|
@ -59,14 +59,16 @@ int main()
|
|||
typedef std::deque<MoveOnly> C;
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::deque<MoveOnly, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
{
|
||||
typedef std::deque<MoveOnly, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C;
|
||||
#if TEST_STD_VER >= 14
|
||||
|
|
|
@ -32,14 +32,16 @@ struct some_alloc
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::forward_list<MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::forward_list<MoveOnly, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::forward_list<MoveOnly, other_allocator<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_default_constructible<C>::value, "");
|
||||
|
|
|
@ -42,8 +42,10 @@ int main()
|
|||
typedef std::forward_list<MoveOnly, other_allocator<MoveOnly>> C;
|
||||
static_assert(std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::forward_list<MoveOnly, some_alloc<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -42,12 +42,14 @@ int main()
|
|||
typedef std::forward_list<MoveOnly, test_allocator<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::forward_list<MoveOnly, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::forward_list<MoveOnly, some_alloc<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -32,18 +32,20 @@ struct some_alloc
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::forward_list<MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::forward_list<MoveOnly, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::forward_list<MoveOnly, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::forward_list<MoveOnly, some_alloc<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
|
||||
|
|
|
@ -59,14 +59,16 @@ int main()
|
|||
typedef std::forward_list<MoveOnly> C;
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::forward_list<MoveOnly, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
{
|
||||
typedef std::forward_list<MoveOnly, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::forward_list<MoveOnly, some_alloc<MoveOnly>> C;
|
||||
#if TEST_STD_VER >= 14
|
||||
|
|
|
@ -32,14 +32,16 @@ struct some_alloc
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::list<MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::list<MoveOnly, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::list<MoveOnly, other_allocator<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_default_constructible<C>::value, "");
|
||||
|
|
|
@ -42,8 +42,10 @@ int main()
|
|||
typedef std::list<MoveOnly, other_allocator<MoveOnly>> C;
|
||||
static_assert(std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::list<MoveOnly, some_alloc<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -42,12 +42,14 @@ int main()
|
|||
typedef std::list<MoveOnly, test_allocator<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::list<MoveOnly, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::list<MoveOnly, some_alloc<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -32,18 +32,20 @@ struct some_alloc
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::list<MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::list<MoveOnly, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::list<MoveOnly, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::list<MoveOnly, some_alloc<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
|
||||
|
|
|
@ -59,14 +59,16 @@ int main()
|
|||
typedef std::list<MoveOnly> C;
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::list<MoveOnly, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
{
|
||||
typedef std::list<MoveOnly, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::list<MoveOnly, some_alloc<MoveOnly>> C;
|
||||
#if TEST_STD_VER >= 14
|
||||
|
|
|
@ -31,14 +31,16 @@ struct some_alloc
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::vector<bool> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::vector<bool, test_allocator<bool>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::vector<bool, other_allocator<bool>> C;
|
||||
static_assert(!std::is_nothrow_default_constructible<C>::value, "");
|
||||
|
|
|
@ -41,8 +41,10 @@ int main()
|
|||
typedef std::vector<bool, other_allocator<bool>> C;
|
||||
static_assert(std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::vector<bool, some_alloc<bool>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -59,31 +59,40 @@ struct some_alloc3
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::vector<bool> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::vector<bool, test_allocator<bool>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::vector<bool, other_allocator<bool>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::vector<bool, some_alloc<bool>> C;
|
||||
#if TEST_STD_VER > 14
|
||||
LIBCPP_STATIC_ASSERT( std::is_nothrow_move_assignable<C>::value, "");
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
typedef std::vector<bool, some_alloc<bool>> C;
|
||||
static_assert( std::is_nothrow_move_assignable<C>::value, "");
|
||||
#endif // _LIBCPP_VERSION
|
||||
#else
|
||||
typedef std::vector<bool, some_alloc<bool>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
#endif
|
||||
}
|
||||
#if TEST_STD_VER > 14
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{ // POCMA false, is_always_equal true
|
||||
typedef std::vector<bool, some_alloc2<bool>> C;
|
||||
LIBCPP_STATIC_ASSERT( std::is_nothrow_move_assignable<C>::value, "");
|
||||
static_assert( std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{ // POCMA false, is_always_equal false
|
||||
typedef std::vector<bool, some_alloc3<bool>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
|
|
|
@ -31,24 +31,29 @@ struct some_alloc
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::vector<bool> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::vector<bool, test_allocator<bool>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::vector<bool, other_allocator<bool>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
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
|
||||
LIBCPP_STATIC_ASSERT( std::is_nothrow_move_constructible<C>::value, "");
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
typedef std::vector<bool, some_alloc<bool>> C;
|
||||
static_assert( std::is_nothrow_move_constructible<C>::value, "");
|
||||
#endif // _LIBCPP_VERSION
|
||||
#else
|
||||
typedef std::vector<bool, some_alloc<bool>> C;
|
||||
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -55,32 +55,39 @@ struct some_alloc2
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::vector<bool> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
{
|
||||
typedef std::vector<bool, test_allocator<bool>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
{
|
||||
typedef std::vector<bool, other_allocator<bool>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::vector<bool, some_alloc<bool>> C;
|
||||
#if TEST_STD_VER >= 14
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
// In c++14, if POCS is set, swapping the allocator is required not to throw
|
||||
LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
typedef std::vector<bool, some_alloc<bool>> C;
|
||||
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
#endif // _LIBCPP_VERSION
|
||||
#else
|
||||
typedef std::vector<bool, some_alloc<bool>> C;
|
||||
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
#endif
|
||||
}
|
||||
#if TEST_STD_VER >= 14
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::vector<bool, some_alloc2<bool>> C;
|
||||
// if the allocators are always equal, then the swap can be noexcept
|
||||
LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -42,8 +42,10 @@ int main()
|
|||
typedef std::vector<MoveOnly, other_allocator<MoveOnly>> C;
|
||||
static_assert(std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::vector<MoveOnly, some_alloc<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -60,10 +60,12 @@ int main()
|
|||
typedef std::vector<MoveOnly> C;
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::vector<MoveOnly, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::vector<MoveOnly, other_allocator<MoveOnly>> C;
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
|
|
|
@ -46,15 +46,17 @@ struct some_hash
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::unordered_map<MoveOnly, MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, test_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
|
||||
|
|
|
@ -53,13 +53,15 @@ int main()
|
|||
std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
|
||||
static_assert(std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::unordered_map<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
|
||||
some_comp<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -54,11 +54,13 @@ int main()
|
|||
std::equal_to<MoveOnly>, test_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::unordered_map<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
|
|
|
@ -42,20 +42,22 @@ struct some_hash
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::unordered_map<MoveOnly, MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, test_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::unordered_map<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
|
||||
|
|
|
@ -125,16 +125,18 @@ int main()
|
|||
typedef std::unordered_map<MoveOnly, MoveOnly> C;
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, test_allocator<MapType>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
{
|
||||
typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, other_allocator<MapType>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::unordered_map<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
|
||||
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
|
@ -178,10 +180,11 @@ int main()
|
|||
typedef std::unordered_map<MoveOnly, MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc2<MapType>> C;
|
||||
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{ // NOT always equal allocator, nothrow swap for hash, nothrow swap for comp
|
||||
typedef std::unordered_map<MoveOnly, MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc3<MapType>> C;
|
||||
LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -46,15 +46,17 @@ struct some_hash
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::unordered_multimap<MoveOnly, MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, test_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
|
||||
|
|
|
@ -53,13 +53,15 @@ int main()
|
|||
std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
|
||||
static_assert(std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
|
||||
some_comp<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -54,11 +54,13 @@ int main()
|
|||
std::equal_to<MoveOnly>, test_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
|
|
|
@ -42,20 +42,22 @@ struct some_hash
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::unordered_multimap<MoveOnly, MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, test_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
|
||||
|
|
|
@ -124,16 +124,18 @@ int main()
|
|||
typedef std::unordered_multimap<MoveOnly, MoveOnly> C;
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, test_allocator<V>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
{
|
||||
typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, other_allocator<V>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
|
||||
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
|
@ -177,9 +179,11 @@ int main()
|
|||
typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc2<V>> C;
|
||||
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{ // NOT always equal allocator, nothrow swap for hash, nothrow swap for comp
|
||||
typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc3<V>> C;
|
||||
LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -46,15 +46,17 @@ struct some_hash
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::unordered_multiset<MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
|
||||
|
|
|
@ -53,13 +53,15 @@ int main()
|
|||
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
|
||||
static_assert(std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
|
||||
some_comp<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -54,11 +54,13 @@ int main()
|
|||
std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
|
|
|
@ -42,20 +42,22 @@ struct some_hash
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::unordered_multiset<MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
|
||||
|
|
|
@ -125,16 +125,18 @@ int main()
|
|||
typedef std::unordered_multiset<MoveOnly> C;
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
{
|
||||
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
|
||||
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
|
@ -178,10 +180,11 @@ int main()
|
|||
typedef std::unordered_multiset<MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc2<MoveOnly>> C;
|
||||
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{ // NOT always equal allocator, nothrow swap for hash, nothrow swap for comp
|
||||
typedef std::unordered_multiset<MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc3<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -46,15 +46,17 @@ struct some_hash
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::unordered_set<MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_default_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
|
||||
|
|
|
@ -53,13 +53,15 @@ int main()
|
|||
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
|
||||
static_assert(std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::unordered_set<MoveOnly, some_hash<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
|
||||
some_comp<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -54,11 +54,13 @@ int main()
|
|||
std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_assignable<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::unordered_set<MoveOnly, some_hash<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
|
||||
|
|
|
@ -42,20 +42,22 @@ struct some_hash
|
|||
|
||||
int main()
|
||||
{
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::unordered_set<MoveOnly> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
{
|
||||
typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
|
||||
static_assert(std::is_nothrow_move_constructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::unordered_set<MoveOnly, some_hash<MoveOnly>> C;
|
||||
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
|
||||
|
|
|
@ -125,16 +125,18 @@ int main()
|
|||
typedef std::unordered_set<MoveOnly> C;
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
{
|
||||
typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
|
||||
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::unordered_set<MoveOnly, some_hash<MoveOnly>> C;
|
||||
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
|
@ -178,10 +180,11 @@ int main()
|
|||
typedef std::unordered_set<MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc2<MoveOnly>> C;
|
||||
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{ // NOT always equal allocator, nothrow swap for hash, nothrow swap for comp
|
||||
typedef std::unordered_set<MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc3<MoveOnly>> C;
|
||||
LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -42,8 +42,10 @@ int main()
|
|||
typedef std::basic_string<char, std::char_traits<char>, test_allocator<char>> C;
|
||||
static_assert(std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, some_alloc<char>> C;
|
||||
LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
|
||||
static_assert(!std::is_nothrow_destructible<C>::value, "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
}
|
||||
|
|
|
@ -59,10 +59,12 @@ int main()
|
|||
typedef std::string C;
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, test_allocator<char>> C;
|
||||
LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
|
||||
}
|
||||
#endif // _LIBCPP_VERSION
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, some_alloc<char>> C;
|
||||
#if TEST_STD_VER >= 14
|
||||
|
|
Loading…
Reference in New Issue