diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-20 21:21:10 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-20 21:21:10 +0000 |
commit | 1c3313bd0215c89fb38710a1ea0762ccf32e859c (patch) | |
tree | 65e6d33ca6254b41a8f4230edff47c5344dbd019 /test/std/algorithms/alg.modifying.operations/alg.move | |
parent | 0dc0969cd0a732760f0aa79942a04e0eaef297c4 (diff) |
Notes
Diffstat (limited to 'test/std/algorithms/alg.modifying.operations/alg.move')
-rw-r--r-- | test/std/algorithms/alg.modifying.operations/alg.move/move.pass.cpp | 13 | ||||
-rw-r--r-- | test/std/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp | 13 |
2 files changed, 10 insertions, 16 deletions
diff --git a/test/std/algorithms/alg.modifying.operations/alg.move/move.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.move/move.pass.cpp index 9a954d934c4e2..0c1cc15445f7f 100644 --- a/test/std/algorithms/alg.modifying.operations/alg.move/move.pass.cpp +++ b/test/std/algorithms/alg.modifying.operations/alg.move/move.pass.cpp @@ -16,10 +16,9 @@ #include <algorithm> #include <cassert> -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include <memory> -#endif +#include "test_macros.h" #include "test_iterators.h" template <class InIter, class OutIter> @@ -38,8 +37,7 @@ test() assert(ia[i] == ib[i]); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - +#if TEST_STD_VER >= 11 template <class InIter, class OutIter> void test1() @@ -55,8 +53,7 @@ test1() for (unsigned i = 0; i < N; ++i) assert(*ib[i] == static_cast<int>(i)); } - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif int main() { @@ -95,7 +92,7 @@ int main() test<const int*, random_access_iterator<int*> >(); test<const int*, int*>(); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 test1<input_iterator<std::unique_ptr<int>*>, output_iterator<std::unique_ptr<int>*> >(); test1<input_iterator<std::unique_ptr<int>*>, input_iterator<std::unique_ptr<int>*> >(); test1<input_iterator<std::unique_ptr<int>*>, forward_iterator<std::unique_ptr<int>*> >(); @@ -130,5 +127,5 @@ int main() test1<std::unique_ptr<int>*, bidirectional_iterator<std::unique_ptr<int>*> >(); test1<std::unique_ptr<int>*, random_access_iterator<std::unique_ptr<int>*> >(); test1<std::unique_ptr<int>*, std::unique_ptr<int>*>(); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // TEST_STD_VER >= 11 } diff --git a/test/std/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp index c5f9d3ac7b6b9..9b3df5af4324c 100644 --- a/test/std/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp +++ b/test/std/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp @@ -16,10 +16,9 @@ #include <algorithm> #include <cassert> -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include <memory> -#endif +#include "test_macros.h" #include "test_iterators.h" template <class InIter, class OutIter> @@ -38,8 +37,7 @@ test() assert(ia[i] == ib[i]); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - +#if TEST_STD_VER >= 11 template <class InIter, class OutIter> void test1() @@ -55,8 +53,7 @@ test1() for (unsigned i = 0; i < N; ++i) assert(*ib[i] == static_cast<int>(i)); } - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif int main() { @@ -72,7 +69,7 @@ int main() test<const int*, random_access_iterator<int*> >(); test<const int*, int*>(); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 test1<bidirectional_iterator<std::unique_ptr<int>*>, bidirectional_iterator<std::unique_ptr<int>*> >(); test1<bidirectional_iterator<std::unique_ptr<int>*>, random_access_iterator<std::unique_ptr<int>*> >(); test1<bidirectional_iterator<std::unique_ptr<int>*>, std::unique_ptr<int>*>(); @@ -84,5 +81,5 @@ int main() test1<std::unique_ptr<int>*, bidirectional_iterator<std::unique_ptr<int>*> >(); test1<std::unique_ptr<int>*, random_access_iterator<std::unique_ptr<int>*> >(); test1<std::unique_ptr<int>*, std::unique_ptr<int>*>(); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // TEST_STD_VER >= 11 } |