summaryrefslogtreecommitdiff
path: root/test/std/iterators/iterator.container/data.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/iterators/iterator.container/data.pass.cpp')
-rw-r--r--test/std/iterators/iterator.container/data.pass.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/std/iterators/iterator.container/data.pass.cpp b/test/std/iterators/iterator.container/data.pass.cpp
index 3d1fa33358db..a7a17480235a 100644
--- a/test/std/iterators/iterator.container/data.pass.cpp
+++ b/test/std/iterators/iterator.container/data.pass.cpp
@@ -13,7 +13,9 @@
// template <class T, size_t N> constexpr T* data(T (&array)[N]) noexcept; // C++17
// template <class E> constexpr const E* data(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::data(c) == c.data());
}
-
+
template<typename T>
void test_container( std::initializer_list<T>& c)
{
@@ -58,7 +60,7 @@ int main()
std::vector<int> v; v.push_back(1);
std::array<int, 1> a; a[0] = 3;
std::initializer_list<int> il = { 4 };
-
+
test_container ( v );
test_container ( a );
test_container ( il );
@@ -66,7 +68,7 @@ int main()
test_const_container ( v );
test_const_container ( a );
test_const_container ( il );
-
+
static constexpr int arrA [] { 1, 2, 3 };
test_const_array ( arrA );
}