Cleanup _LIBCPP_HAS_NO_<c++11-feature> in algorithm

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300625 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2017-04-18 23:26:47 +00:00
parent 82810a6cef
commit 6b17a7ba2c
16 changed files with 72 additions and 110 deletions

View File

@@ -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 Iter1, class Iter2>
@@ -38,8 +37,7 @@ test()
assert(j[2] == 3);
}
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
#if TEST_STD_VER >= 11
template<class Iter1, class Iter2>
void
test1()
@@ -59,8 +57,7 @@ test1()
assert(*j[1] == 2);
assert(*j[2] == 3);
}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#endif // TEST_STD_VER >= 11
void test2()
{
@@ -131,8 +128,7 @@ int main()
test<int*, random_access_iterator<int*> >();
test<int*, int*>();
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
#if TEST_STD_VER >= 11
test1<forward_iterator<std::unique_ptr<int>*>, forward_iterator<std::unique_ptr<int>*> >();
test1<forward_iterator<std::unique_ptr<int>*>, bidirectional_iterator<std::unique_ptr<int>*> >();
test1<forward_iterator<std::unique_ptr<int>*>, random_access_iterator<std::unique_ptr<int>*> >();
@@ -152,8 +148,7 @@ 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
test2();
}