aboutsummaryrefslogtreecommitdiff
path: root/test/std/iterators/iterator.container/size.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/iterators/iterator.container/size.pass.cpp')
-rw-r--r--test/std/iterators/iterator.container/size.pass.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/std/iterators/iterator.container/size.pass.cpp b/test/std/iterators/iterator.container/size.pass.cpp
index 705fb40e1926..87b0ef897072 100644
--- a/test/std/iterators/iterator.container/size.pass.cpp
+++ b/test/std/iterators/iterator.container/size.pass.cpp
@@ -11,7 +11,9 @@
// template <class C> constexpr auto size(const C& c) -> decltype(c.size()); // C++17
// template <class T, size_t N> constexpr size_t size(const T (&array)[N]) noexcept; // C++17
-#if __cplusplus <= 201402L
+#include "test_macros.h"
+
+#if TEST_STD_VER <= 14
int main () {}
#else
@@ -39,7 +41,7 @@ void test_container( C& c)
{
assert ( std::size(c) == c.size());
}
-
+
template<typename T>
void test_container( std::initializer_list<T>& c )
{
@@ -58,7 +60,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 );
@@ -68,7 +70,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 );
}