summaryrefslogtreecommitdiffstats
path: root/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp')
-rw-r--r--test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp b/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp
index b3edd31f7..38b0ab815 100644
--- a/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp
+++ b/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp
@@ -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
}