summaryrefslogtreecommitdiff
path: root/test/std/iterators/iterator.container/empty.pass.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:47:26 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:47:26 +0000
commit51072bd6bf79ef2bc6a922079bff57c31c1effbc (patch)
tree91a2effbc9e6f80bdbbf9eb70e06c51ad0867ea0 /test/std/iterators/iterator.container/empty.pass.cpp
parentbb5e33f003797b67974a8893f7f2930fc51b8210 (diff)
Notes
Diffstat (limited to 'test/std/iterators/iterator.container/empty.pass.cpp')
-rw-r--r--test/std/iterators/iterator.container/empty.pass.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/std/iterators/iterator.container/empty.pass.cpp b/test/std/iterators/iterator.container/empty.pass.cpp
index f26cb98e1aed..f9b8b94a89f9 100644
--- a/test/std/iterators/iterator.container/empty.pass.cpp
+++ b/test/std/iterators/iterator.container/empty.pass.cpp
@@ -12,7 +12,9 @@
// template <class T, size_t N> constexpr bool empty(const T (&array)[N]) noexcept; // C++17
// template <class E> constexpr bool empty(initializer_list<E> il) noexcept; // C++17
-#if __cplusplus <= 201402L
+#include "test_macros.h"
+
+#if TEST_STD_VER <= 14
int main () {}
#else
@@ -40,7 +42,7 @@ void test_container( C& c )
{
assert ( std::empty(c) == c.empty());
}
-
+
template<typename T>
void test_container( std::initializer_list<T>& c )
{
@@ -59,7 +61,7 @@ int main()
std::list<int> l; l.push_back(2);
std::array<int, 1> a; a[0] = 3;
std::initializer_list<int> il = { 4 };
-
+
test_container ( v );
test_container ( l );
test_container ( a );
@@ -69,7 +71,7 @@ int main()
test_const_container ( l );
test_const_container ( a );
test_const_container ( il );
-
+
static constexpr int arrA [] { 1, 2, 3 };
test_const_array ( arrA );
}