summaryrefslogtreecommitdiff
path: root/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp')
-rw-r--r--test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp b/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp
index dedc89bd435ed..817f1207ac949 100644
--- a/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp
+++ b/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp
@@ -17,9 +17,12 @@
// This tests a conforming extension
+// UNSUPPORTED: c++98, c++03
+
#include <map>
#include <cassert>
+#include "test_macros.h"
#include "MoveOnly.h"
#include "test_allocator.h"
@@ -28,19 +31,19 @@ struct some_comp
{
typedef T value_type;
some_comp();
+ bool operator()(const T&, const T&) const { return false; }
};
int main()
{
-#if __has_feature(cxx_noexcept)
typedef std::pair<const MoveOnly, MoveOnly> V;
{
typedef std::map<MoveOnly, MoveOnly> C;
- static_assert(std::is_nothrow_default_constructible<C>::value, "");
+ LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
}
{
typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
- static_assert(std::is_nothrow_default_constructible<C>::value, "");
+ LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
}
{
typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
@@ -50,5 +53,4 @@ int main()
typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
static_assert(!std::is_nothrow_default_constructible<C>::value, "");
}
-#endif
}