diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:47:26 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:47:26 +0000 |
commit | 51072bd6bf79ef2bc6a922079bff57c31c1effbc (patch) | |
tree | 91a2effbc9e6f80bdbbf9eb70e06c51ad0867ea0 /test/std/iterators/iterator.range | |
parent | bb5e33f003797b67974a8893f7f2930fc51b8210 (diff) |
Notes
Diffstat (limited to 'test/std/iterators/iterator.range')
-rw-r--r-- | test/std/iterators/iterator.range/begin-end.pass.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/std/iterators/iterator.range/begin-end.pass.cpp b/test/std/iterators/iterator.range/begin-end.pass.cpp index bd7e0aa90fbc..ec3f61789b27 100644 --- a/test/std/iterators/iterator.range/begin-end.pass.cpp +++ b/test/std/iterators/iterator.range/begin-end.pass.cpp @@ -15,7 +15,9 @@ // template <class E> reverse_iterator<const E*> rbegin(initializer_list<E> il); // template <class E> reverse_iterator<const E*> rend(initializer_list<E> il); -#if __cplusplus >= 201103L +#include "test_macros.h" + +#if TEST_STD_VER >= 11 #include <iterator> #include <cassert> #include <vector> @@ -81,7 +83,7 @@ void test_container( C & c, typename C::value_type val ) { assert ( std::crend(c) == c.crend()); #endif } - + template<typename T> void test_container( std::initializer_list<T> & c, T val ) { assert ( std::begin(c) == c.begin()); @@ -121,7 +123,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, 1 ); test_container ( l, 2 ); test_container ( a, 3 ); @@ -131,7 +133,7 @@ int main(){ test_const_container ( l, 2 ); test_const_container ( a, 3 ); test_const_container ( il, 4 ); - + static constexpr int arrA [] { 1, 2, 3 }; test_const_array ( arrA ); #if _LIBCPP_STD_VER > 11 |