Changed __config to react to all of clang's currently documented has_feature flags, and renamed _LIBCPP_MOVE to _LIBCPP_HAS_NO_RVALUE_REFERENCES to be more consistent with the rest of the libc++'s flags, and with clang's nomenclature.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@113086 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
|
||||
struct indirect_less
|
||||
@@ -29,7 +29,7 @@ struct indirect_less
|
||||
{return *x < *y;}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
void
|
||||
test_larger_sorts(unsigned N, unsigned M)
|
||||
@@ -74,7 +74,7 @@ int main()
|
||||
test_larger_sorts(1000);
|
||||
test_larger_sorts(1009);
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
std::vector<std::unique_ptr<int> > v(1000);
|
||||
for (int i = 0; i < v.size(); ++i)
|
||||
@@ -83,5 +83,5 @@ int main()
|
||||
for (int i = 0; i < v.size()/2; ++i)
|
||||
assert(*v[i] == i);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
|
||||
struct indirect_less
|
||||
@@ -29,7 +29,7 @@ struct indirect_less
|
||||
{return *x < *y;}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -42,7 +42,7 @@ int main()
|
||||
assert(std::is_sorted(v.begin(), v.end()));
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
std::vector<std::unique_ptr<int> > v(1000);
|
||||
for (int i = 0; i < v.size(); ++i)
|
||||
@@ -53,5 +53,5 @@ int main()
|
||||
assert(*v[1] == 1);
|
||||
assert(*v[2] == 2);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
|
||||
struct indirect_less
|
||||
@@ -29,7 +29,7 @@ struct indirect_less
|
||||
{return *x < *y;}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
struct first_only
|
||||
{
|
||||
@@ -68,7 +68,7 @@ int main()
|
||||
{
|
||||
test();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
std::vector<std::unique_ptr<int> > v(1000);
|
||||
for (int i = 0; i < v.size(); ++i)
|
||||
@@ -79,5 +79,5 @@ int main()
|
||||
assert(*v[1] == 1);
|
||||
assert(*v[2] == 2);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
Reference in New Issue
Block a user