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:
@@ -16,7 +16,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
@@ -38,7 +38,7 @@ test()
|
||||
assert(ia[i] == ib[i]);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class InIter, class OutIter>
|
||||
void
|
||||
@@ -56,7 +56,7 @@ test1()
|
||||
assert(*ib[i] == i);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -95,7 +95,7 @@ int main()
|
||||
test<const int*, random_access_iterator<int*> >();
|
||||
test<const int*, int*>();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
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 +130,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_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
@@ -38,7 +38,7 @@ test()
|
||||
assert(ia[i] == ib[i]);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class InIter, class OutIter>
|
||||
void
|
||||
@@ -56,7 +56,7 @@ test1()
|
||||
assert(*ib[i] == i);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -72,7 +72,7 @@ int main()
|
||||
test<const int*, random_access_iterator<int*> >();
|
||||
test<const int*, int*>();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
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 +84,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_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
@@ -283,7 +283,7 @@ test()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
struct is_null
|
||||
{
|
||||
@@ -300,7 +300,7 @@ test1()
|
||||
Iter r = std::stable_partition(Iter(array), Iter(array+size), is_null());
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -308,7 +308,7 @@ int main()
|
||||
test<random_access_iterator<std::pair<int,int>*> >();
|
||||
test<std::pair<int,int>*>();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test1<bidirectional_iterator<std::unique_ptr<int>*> >();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
@@ -39,7 +39,7 @@ test()
|
||||
assert(ia[5] == 4);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class Iter>
|
||||
void
|
||||
@@ -63,7 +63,7 @@ test1()
|
||||
assert(*ia[5] == 4);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -72,12 +72,12 @@ int main()
|
||||
test<random_access_iterator<int*> >();
|
||||
test<int*>();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
test1<forward_iterator<std::unique_ptr<int>*> >();
|
||||
test1<bidirectional_iterator<std::unique_ptr<int>*> >();
|
||||
test1<random_access_iterator<std::unique_ptr<int>*> >();
|
||||
test1<std::unique_ptr<int>*>();
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
@@ -40,7 +40,7 @@ test()
|
||||
assert(ia[5] == 4);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
struct pred
|
||||
{
|
||||
@@ -72,7 +72,7 @@ test1()
|
||||
assert(*ia[5] == 4);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -81,12 +81,12 @@ int main()
|
||||
test<random_access_iterator<int*> >();
|
||||
test<int*>();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
test1<forward_iterator<std::unique_ptr<int>*> >();
|
||||
test1<bidirectional_iterator<std::unique_ptr<int>*> >();
|
||||
test1<random_access_iterator<std::unique_ptr<int>*> >();
|
||||
test1<std::unique_ptr<int>*>();
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
@@ -213,7 +213,7 @@ test()
|
||||
assert(ig[5] == 2);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class Iter>
|
||||
void
|
||||
@@ -419,7 +419,7 @@ test1()
|
||||
assert(*ig[5] == 2);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -428,12 +428,12 @@ int main()
|
||||
test<random_access_iterator<int*> >();
|
||||
test<int*>();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
test1<forward_iterator<std::unique_ptr<int>*> >();
|
||||
test1<bidirectional_iterator<std::unique_ptr<int>*> >();
|
||||
test1<random_access_iterator<std::unique_ptr<int>*> >();
|
||||
test1<std::unique_ptr<int>*>();
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
@@ -38,7 +38,7 @@ test()
|
||||
assert(j[2] == 3);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template<class Iter1, class Iter2>
|
||||
void
|
||||
@@ -60,7 +60,7 @@ test1()
|
||||
assert(*j[2] == 3);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -84,7 +84,7 @@ int main()
|
||||
test<int*, random_access_iterator<int*> >();
|
||||
test<int*, int*>();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
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>*> >();
|
||||
@@ -106,5 +106,5 @@ int main()
|
||||
test1<std::unique_ptr<int>*, random_access_iterator<std::unique_ptr<int>*> >();
|
||||
test1<std::unique_ptr<int>*, std::unique_ptr<int>*>();
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
@@ -84,7 +84,7 @@ test()
|
||||
assert(ii[2] == 2);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
struct do_nothing
|
||||
{
|
||||
@@ -169,7 +169,7 @@ test1()
|
||||
assert(*ii[2] == 2);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -178,12 +178,12 @@ int main()
|
||||
test<random_access_iterator<int*> >();
|
||||
test<int*>();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
test1<forward_iterator<Ptr*> >();
|
||||
test1<bidirectional_iterator<Ptr*> >();
|
||||
test1<random_access_iterator<Ptr*> >();
|
||||
test1<Ptr*>();
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
@@ -110,7 +110,7 @@ test()
|
||||
assert(count_equal::count == si-1);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
struct do_nothing
|
||||
{
|
||||
@@ -211,7 +211,7 @@ test1()
|
||||
assert(count_equal::count == si-1);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -220,12 +220,12 @@ int main()
|
||||
test<random_access_iterator<int*> >();
|
||||
test<int*>();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
test1<forward_iterator<Ptr*> >();
|
||||
test1<bidirectional_iterator<Ptr*> >();
|
||||
test1<random_access_iterator<Ptr*> >();
|
||||
test1<Ptr*>();
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
|
||||
struct indirect_less
|
||||
@@ -27,7 +27,7 @@ struct indirect_less
|
||||
{return *x < *y;}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
void test(unsigned N)
|
||||
{
|
||||
@@ -49,7 +49,7 @@ int main()
|
||||
test(10);
|
||||
test(1000);
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
const int N = 1000;
|
||||
std::unique_ptr<int>* ia = new std::unique_ptr<int> [N];
|
||||
@@ -60,5 +60,5 @@ int main()
|
||||
assert(std::is_heap(ia, ia+N, indirect_less()));
|
||||
delete [] ia;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
|
||||
struct indirect_less
|
||||
@@ -27,7 +27,7 @@ struct indirect_less
|
||||
{return *x < *y;}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
void test(unsigned N)
|
||||
{
|
||||
@@ -49,7 +49,7 @@ int main()
|
||||
{
|
||||
test(1000);
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
const int N = 1000;
|
||||
std::unique_ptr<int>* ia = new std::unique_ptr<int> [N];
|
||||
@@ -64,5 +64,5 @@ int main()
|
||||
}
|
||||
delete [] ia;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
|
||||
struct indirect_less
|
||||
@@ -28,7 +28,7 @@ struct indirect_less
|
||||
{return *x < *y;}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
void test(unsigned N)
|
||||
{
|
||||
@@ -48,7 +48,7 @@ int main()
|
||||
{
|
||||
test(1000);
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
const int N = 1000;
|
||||
std::unique_ptr<int>* ia = new std::unique_ptr<int> [N];
|
||||
@@ -62,5 +62,5 @@ int main()
|
||||
}
|
||||
delete [] ia;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
|
||||
struct indirect_less
|
||||
@@ -27,7 +27,7 @@ struct indirect_less
|
||||
{return *x < *y;}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
void test(unsigned N)
|
||||
{
|
||||
@@ -50,7 +50,7 @@ int main()
|
||||
test(10);
|
||||
test(1000);
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
const int N = 1000;
|
||||
std::unique_ptr<int>* ia = new std::unique_ptr<int> [N];
|
||||
@@ -62,5 +62,5 @@ int main()
|
||||
assert(std::is_sorted(ia, ia+N, indirect_less()));
|
||||
delete [] ia;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
|
||||
struct indirect_less
|
||||
@@ -28,7 +28,7 @@ struct indirect_less
|
||||
{return *x < *y;}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#include "../../iterators.h"
|
||||
|
||||
@@ -89,7 +89,7 @@ int main()
|
||||
test<random_access_iterator<int*> >();
|
||||
test<int*>();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
unsigned N = 100;
|
||||
unsigned M = 50;
|
||||
@@ -108,5 +108,5 @@ int main()
|
||||
}
|
||||
delete [] ia;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
int i = std::max({2, 3, 1});
|
||||
assert(i == 3);
|
||||
i = std::max({2, 1, 3});
|
||||
@@ -31,5 +31,5 @@ int main()
|
||||
assert(i == 3);
|
||||
i = std::max({1, 3, 2});
|
||||
assert(i == 3);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
int i = std::max({2, 3, 1}, std::greater<int>());
|
||||
assert(i == 1);
|
||||
i = std::max({2, 1, 3}, std::greater<int>());
|
||||
@@ -32,5 +32,5 @@ int main()
|
||||
assert(i == 1);
|
||||
i = std::max({1, 3, 2}, std::greater<int>());
|
||||
assert(i == 1);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
int i = std::min({2, 3, 1});
|
||||
assert(i == 1);
|
||||
i = std::min({2, 1, 3});
|
||||
@@ -31,5 +31,5 @@ int main()
|
||||
assert(i == 1);
|
||||
i = std::min({1, 3, 2});
|
||||
assert(i == 1);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
int i = std::min({2, 3, 1}, std::greater<int>());
|
||||
assert(i == 3);
|
||||
i = std::min({2, 1, 3}, std::greater<int>());
|
||||
@@ -32,5 +32,5 @@ int main()
|
||||
assert(i == 3);
|
||||
i = std::min({1, 3, 2}, std::greater<int>());
|
||||
assert(i == 3);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
assert((std::minmax({1, 2, 3}) == std::pair<int, int>(1, 3)));
|
||||
assert((std::minmax({1, 3, 2}) == std::pair<int, int>(1, 3)));
|
||||
assert((std::minmax({2, 1, 3}) == std::pair<int, int>(1, 3)));
|
||||
assert((std::minmax({2, 3, 1}) == std::pair<int, int>(1, 3)));
|
||||
assert((std::minmax({3, 1, 2}) == std::pair<int, int>(1, 3)));
|
||||
assert((std::minmax({3, 2, 1}) == std::pair<int, int>(1, 3)));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
assert((std::minmax({1, 2, 3}, std::greater<int>()) == std::pair<int, int>(3, 1)));
|
||||
assert((std::minmax({1, 3, 2}, std::greater<int>()) == std::pair<int, int>(3, 1)));
|
||||
assert((std::minmax({2, 1, 3}, std::greater<int>()) == std::pair<int, int>(3, 1)));
|
||||
assert((std::minmax({2, 3, 1}, std::greater<int>()) == std::pair<int, int>(3, 1)));
|
||||
assert((std::minmax({3, 1, 2}, std::greater<int>()) == std::pair<int, int>(3, 1)));
|
||||
assert((std::minmax({3, 2, 1}, std::greater<int>()) == std::pair<int, int>(3, 1)));
|
||||
#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
|
||||
|
||||
void
|
||||
test_one(unsigned N, unsigned M)
|
||||
@@ -73,7 +73,7 @@ int main()
|
||||
test(1000);
|
||||
test(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)
|
||||
@@ -81,5 +81,5 @@ int main()
|
||||
std::nth_element(v.begin(), v.begin() + v.size()/2, v.end(), indirect_less());
|
||||
assert(*v[v.size()/2] == v.size()/2);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef EMPLACEABLE_H
|
||||
#define EMPLACEABLE_H
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
class Emplaceable
|
||||
{
|
||||
@@ -40,6 +40,6 @@ struct hash<Emplaceable>
|
||||
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#endif // EMPLACEABLE_H
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef MOVEONLY_H
|
||||
#define MOVEONLY_H
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
@@ -36,6 +36,6 @@ struct hash<MoveOnly>
|
||||
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#endif // MOVEONLY_H
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::pair<MoveOnly, double> V;
|
||||
std::map<MoveOnly, double> m;
|
||||
assert(m.size() == 0);
|
||||
@@ -34,5 +34,5 @@ int main()
|
||||
m[6] = 6.5;
|
||||
assert(m[6] == 6.5);
|
||||
assert(m.size() == 2);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::pair<const int, double> V;
|
||||
std::map<int, double> m =
|
||||
{
|
||||
@@ -41,5 +41,5 @@ int main()
|
||||
assert(*m.begin() == V(1, 1));
|
||||
assert(*next(m.begin()) == V(2, 1));
|
||||
assert(*next(m.begin(), 2) == V(3, 1));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::pair<const int, double> V;
|
||||
std::map<int, double> m =
|
||||
{
|
||||
@@ -37,5 +37,5 @@ int main()
|
||||
assert(*m.begin() == V(1, 1));
|
||||
assert(*next(m.begin()) == V(2, 1));
|
||||
assert(*next(m.begin(), 2) == V(3, 1));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::pair<const int, double> V;
|
||||
typedef test_compare<std::less<int> > C;
|
||||
std::map<int, double, C> m({
|
||||
@@ -39,5 +39,5 @@ int main()
|
||||
assert(*next(m.begin()) == V(2, 1));
|
||||
assert(*next(m.begin(), 2) == V(3, 1));
|
||||
assert(m.key_comp() == C(3));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::pair<const int, double> V;
|
||||
typedef test_compare<std::less<int> > C;
|
||||
typedef test_allocator<std::pair<const int, double> > A;
|
||||
@@ -42,5 +42,5 @@ int main()
|
||||
assert(*next(m.begin(), 2) == V(3, 1));
|
||||
assert(m.key_comp() == C(3));
|
||||
assert(m.get_allocator() == A(6));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::pair<const int, double> V;
|
||||
{
|
||||
typedef test_compare<std::less<int> > C;
|
||||
@@ -68,5 +68,5 @@ int main()
|
||||
assert(mo.size() == 0);
|
||||
assert(distance(mo.begin(), mo.end()) == 0);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::pair<MoveOnly, MoveOnly> V;
|
||||
typedef std::pair<const MoveOnly, MoveOnly> VC;
|
||||
@@ -140,5 +140,5 @@ int main()
|
||||
assert(m3.key_comp() == C(5));
|
||||
assert(m1.empty());
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::pair<MoveOnly, MoveOnly> V;
|
||||
typedef std::pair<const MoveOnly, MoveOnly> VC;
|
||||
@@ -143,5 +143,5 @@ int main()
|
||||
assert(m3.key_comp() == C(5));
|
||||
assert(m1.empty());
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::map<int, DefaultOnly> M;
|
||||
typedef std::pair<M::iterator, bool> R;
|
||||
@@ -85,5 +85,5 @@ int main()
|
||||
assert(m.begin()->first == 2);
|
||||
assert(m.begin()->second == 3.5);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::map<int, DefaultOnly> M;
|
||||
typedef M::iterator R;
|
||||
@@ -78,5 +78,5 @@ int main()
|
||||
assert(m.begin()->first == 2);
|
||||
assert(m.begin()->second == 3.5);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::pair<const int, double> V;
|
||||
std::map<int, double> m =
|
||||
{
|
||||
@@ -39,5 +39,5 @@ int main()
|
||||
assert(*m.begin() == V(1, 1));
|
||||
assert(*next(m.begin()) == V(2, 1));
|
||||
assert(*next(m.begin(), 2) == V(3, 1));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::map<int, MoveOnly> M;
|
||||
typedef std::pair<int, MoveOnly> P;
|
||||
@@ -51,5 +51,5 @@ int main()
|
||||
assert(r->first == 3);
|
||||
assert(r->second == 3);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::map<int, MoveOnly> M;
|
||||
typedef std::pair<M::iterator, bool> R;
|
||||
@@ -54,5 +54,5 @@ int main()
|
||||
assert(r.first->first == 3);
|
||||
assert(r.first->second == 3);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::multimap<int, double> C;
|
||||
typedef C::value_type V;
|
||||
C m = {{20, 1}};
|
||||
@@ -46,5 +46,5 @@ int main()
|
||||
assert(*++i == V(3, 1));
|
||||
assert(*++i == V(3, 1.5));
|
||||
assert(*++i == V(3, 2));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::multimap<int, double> C;
|
||||
typedef C::value_type V;
|
||||
C m =
|
||||
@@ -45,5 +45,5 @@ int main()
|
||||
assert(*++i == V(3, 1));
|
||||
assert(*++i == V(3, 1.5));
|
||||
assert(*++i == V(3, 2));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef test_compare<std::less<int> > Cmp;
|
||||
typedef std::multimap<int, double, Cmp> C;
|
||||
typedef C::value_type V;
|
||||
@@ -50,5 +50,5 @@ int main()
|
||||
assert(*++i == V(3, 1.5));
|
||||
assert(*++i == V(3, 2));
|
||||
assert(m.key_comp() == Cmp(4));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef test_compare<std::less<int> > Cmp;
|
||||
typedef test_allocator<std::pair<const int, double> > A;
|
||||
typedef std::multimap<int, double, Cmp, A> C;
|
||||
@@ -53,5 +53,5 @@ int main()
|
||||
assert(*++i == V(3, 2));
|
||||
assert(m.key_comp() == Cmp(4));
|
||||
assert(m.get_allocator() == A(5));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::pair<const int, double> V;
|
||||
{
|
||||
typedef test_compare<std::less<int> > C;
|
||||
@@ -74,5 +74,5 @@ int main()
|
||||
assert(mo.size() == 0);
|
||||
assert(distance(mo.begin(), mo.end()) == 0);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::pair<MoveOnly, MoveOnly> V;
|
||||
typedef std::pair<const MoveOnly, MoveOnly> VC;
|
||||
@@ -140,5 +140,5 @@ int main()
|
||||
assert(m3.key_comp() == C(5));
|
||||
assert(m1.empty());
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::pair<MoveOnly, MoveOnly> V;
|
||||
typedef std::pair<const MoveOnly, MoveOnly> VC;
|
||||
@@ -143,5 +143,5 @@ int main()
|
||||
assert(m3.key_comp() == C(5));
|
||||
assert(m1.empty());
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::multimap<int, DefaultOnly> M;
|
||||
typedef M::iterator R;
|
||||
@@ -78,5 +78,5 @@ int main()
|
||||
assert(m.begin()->first == 2);
|
||||
assert(m.begin()->second == 3.5);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::multimap<int, DefaultOnly> M;
|
||||
typedef M::iterator R;
|
||||
@@ -78,5 +78,5 @@ int main()
|
||||
assert(m.begin()->first == 2);
|
||||
assert(m.begin()->second == 3.5);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::multimap<int, double> C;
|
||||
typedef C::value_type V;
|
||||
C m =
|
||||
@@ -49,5 +49,5 @@ int main()
|
||||
assert(*++i == V(3, 1));
|
||||
assert(*++i == V(3, 2));
|
||||
assert(*++i == V(3, 1.5));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::multimap<int, MoveOnly> M;
|
||||
typedef std::pair<int, MoveOnly> P;
|
||||
@@ -51,5 +51,5 @@ int main()
|
||||
assert(r->first == 3);
|
||||
assert(r->second == 2);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::multimap<int, MoveOnly> M;
|
||||
typedef M::iterator R;
|
||||
@@ -50,5 +50,5 @@ int main()
|
||||
assert(r->first == 3);
|
||||
assert(r->second == 3);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::multiset<DefaultOnly> M;
|
||||
typedef M::iterator R;
|
||||
@@ -67,5 +67,5 @@ int main()
|
||||
assert(m.size() == 1);
|
||||
assert(*r == 2);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::multiset<DefaultOnly> M;
|
||||
typedef M::iterator R;
|
||||
@@ -67,5 +67,5 @@ int main()
|
||||
assert(m.size() == 1);
|
||||
assert(*r == 2);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::multiset<int> C;
|
||||
typedef C::value_type V;
|
||||
C m = {10, 8};
|
||||
@@ -34,5 +34,5 @@ int main()
|
||||
assert(*++i == V(6));
|
||||
assert(*++i == V(8));
|
||||
assert(*++i == V(10));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::multiset<MoveOnly> M;
|
||||
typedef M::iterator R;
|
||||
@@ -45,5 +45,5 @@ int main()
|
||||
assert(m.size() == 4);
|
||||
assert(*r == 3);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::multiset<MoveOnly> M;
|
||||
typedef M::iterator R;
|
||||
@@ -45,5 +45,5 @@ int main()
|
||||
assert(m.size() == 4);
|
||||
assert(*r == 3);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::multiset<int> C;
|
||||
typedef C::value_type V;
|
||||
C m = {10, 8};
|
||||
@@ -32,5 +32,5 @@ int main()
|
||||
assert(*++i == V(4));
|
||||
assert(*++i == V(5));
|
||||
assert(*++i == V(6));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::multiset<int> C;
|
||||
typedef C::value_type V;
|
||||
C m = {1, 2, 3, 4, 5, 6};
|
||||
@@ -31,5 +31,5 @@ int main()
|
||||
assert(*++i == V(4));
|
||||
assert(*++i == V(5));
|
||||
assert(*++i == V(6));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef test_compare<std::less<int> > Cmp;
|
||||
typedef std::multiset<int, Cmp> C;
|
||||
typedef C::value_type V;
|
||||
@@ -34,5 +34,5 @@ int main()
|
||||
assert(*++i == V(5));
|
||||
assert(*++i == V(6));
|
||||
assert(m.key_comp() == Cmp(10));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef test_compare<std::less<int> > Cmp;
|
||||
typedef test_allocator<int> A;
|
||||
typedef std::multiset<int, Cmp, A> C;
|
||||
@@ -37,5 +37,5 @@ int main()
|
||||
assert(*++i == V(6));
|
||||
assert(m.key_comp() == Cmp(10));
|
||||
assert(m.get_allocator() == A(4));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef int V;
|
||||
typedef test_compare<std::less<int> > C;
|
||||
@@ -75,5 +75,5 @@ int main()
|
||||
assert(mo.size() == 0);
|
||||
assert(distance(mo.begin(), mo.end()) == 0);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef MoveOnly V;
|
||||
typedef test_compare<std::less<MoveOnly> > C;
|
||||
@@ -137,5 +137,5 @@ int main()
|
||||
assert(m3.key_comp() == C(5));
|
||||
assert(m1.empty());
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef MoveOnly V;
|
||||
typedef test_compare<std::less<MoveOnly> > C;
|
||||
@@ -140,5 +140,5 @@ int main()
|
||||
assert(m3.key_comp() == C(5));
|
||||
assert(m1.empty());
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::set<DefaultOnly> M;
|
||||
typedef std::pair<M::iterator, bool> R;
|
||||
@@ -73,5 +73,5 @@ int main()
|
||||
assert(m.size() == 1);
|
||||
assert(*r.first == 2);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::set<DefaultOnly> M;
|
||||
typedef M::iterator R;
|
||||
@@ -67,5 +67,5 @@ int main()
|
||||
assert(m.size() == 1);
|
||||
assert(*r == 2);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::set<int> C;
|
||||
typedef C::value_type V;
|
||||
C m = {10, 8};
|
||||
@@ -34,5 +34,5 @@ int main()
|
||||
assert(*++i == V(6));
|
||||
assert(*++i == V(8));
|
||||
assert(*++i == V(10));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::set<MoveOnly> M;
|
||||
typedef M::iterator R;
|
||||
@@ -45,5 +45,5 @@ int main()
|
||||
assert(m.size() == 3);
|
||||
assert(*r == 3);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::set<MoveOnly> M;
|
||||
typedef std::pair<M::iterator, bool> R;
|
||||
@@ -49,5 +49,5 @@ int main()
|
||||
assert(m.size() == 3);
|
||||
assert(*r.first == 3);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::set<int> C;
|
||||
typedef C::value_type V;
|
||||
C m = {10, 8};
|
||||
@@ -32,5 +32,5 @@ int main()
|
||||
assert(*++i == V(4));
|
||||
assert(*++i == V(5));
|
||||
assert(*++i == V(6));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::set<int> C;
|
||||
typedef C::value_type V;
|
||||
C m = {1, 2, 3, 4, 5, 6};
|
||||
@@ -31,5 +31,5 @@ int main()
|
||||
assert(*++i == V(4));
|
||||
assert(*++i == V(5));
|
||||
assert(*++i == V(6));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef test_compare<std::less<int> > Cmp;
|
||||
typedef std::set<int, Cmp> C;
|
||||
typedef C::value_type V;
|
||||
@@ -34,5 +34,5 @@ int main()
|
||||
assert(*++i == V(5));
|
||||
assert(*++i == V(6));
|
||||
assert(m.key_comp() == Cmp(10));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef test_compare<std::less<int> > Cmp;
|
||||
typedef test_allocator<int> A;
|
||||
typedef std::set<int, Cmp, A> C;
|
||||
@@ -37,5 +37,5 @@ int main()
|
||||
assert(*++i == V(6));
|
||||
assert(m.key_comp() == Cmp(10));
|
||||
assert(m.get_allocator() == A(4));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef int V;
|
||||
typedef test_compare<std::less<int> > C;
|
||||
@@ -69,5 +69,5 @@ int main()
|
||||
assert(mo.size() == 0);
|
||||
assert(distance(mo.begin(), mo.end()) == 0);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef MoveOnly V;
|
||||
typedef test_compare<std::less<MoveOnly> > C;
|
||||
@@ -137,5 +137,5 @@ int main()
|
||||
assert(m3.key_comp() == C(5));
|
||||
assert(m1.empty());
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef MoveOnly V;
|
||||
typedef test_compare<std::less<MoveOnly> > C;
|
||||
@@ -140,5 +140,5 @@ int main()
|
||||
assert(m3.key_comp() == C(5));
|
||||
assert(m1.empty());
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -30,11 +30,11 @@ struct test
|
||||
: base(comp, c, a) {}
|
||||
test(const value_compare& comp, const container_type& c,
|
||||
const test_allocator<int>& a) : base(comp, c, a) {}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test(const value_compare& comp, container_type&& c,
|
||||
const test_allocator<int>& a) : base(comp, std::move(c), a) {}
|
||||
test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test_allocator<int> get_allocator() {return c.get_allocator();}
|
||||
|
||||
using base::c;
|
||||
|
||||
@@ -30,11 +30,11 @@ struct test
|
||||
: base(comp, a) {}
|
||||
test(const value_compare& comp, const container_type& c,
|
||||
const test_allocator<int>& a) : base(comp, c, a) {}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test(const value_compare& comp, container_type&& c,
|
||||
const test_allocator<int>& a) : base(comp, std::move(c), a) {}
|
||||
test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test_allocator<int> get_allocator() {return c.get_allocator();}
|
||||
|
||||
using base::c;
|
||||
|
||||
@@ -41,11 +41,11 @@ struct test
|
||||
: base(comp, a) {}
|
||||
test(const value_compare& comp, const container_type& c,
|
||||
const test_allocator<int>& a) : base(comp, c, a) {}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test(const value_compare& comp, container_type&& c,
|
||||
const test_allocator<int>& a) : base(comp, std::move(c), a) {}
|
||||
test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test_allocator<int> get_allocator() {return c.get_allocator();}
|
||||
|
||||
using base::c;
|
||||
|
||||
@@ -41,11 +41,11 @@ struct test
|
||||
: base(comp, a) {}
|
||||
test(const value_compare& comp, const container_type& c,
|
||||
const test_allocator<int>& a) : base(comp, c, a) {}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test(const value_compare& comp, container_type&& c,
|
||||
const test_allocator<int>& a) : base(comp, std::move(c), a) {}
|
||||
test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test_allocator<int> get_allocator() {return c.get_allocator();}
|
||||
|
||||
using base::c;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include "../../../../MoveOnly.h"
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class C>
|
||||
C
|
||||
@@ -52,11 +52,11 @@ struct test
|
||||
using base::c;
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test<MoveOnly> qo(std::less<MoveOnly>(),
|
||||
make<std::vector<MoveOnly, test_allocator<MoveOnly> > >(5),
|
||||
test_allocator<MoveOnly>(2));
|
||||
@@ -64,5 +64,5 @@ int main()
|
||||
assert(q.size() == 5);
|
||||
assert(q.c.get_allocator() == test_allocator<MoveOnly>(6));
|
||||
assert(q.top() == MoveOnly(4));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "../../../../MoveOnly.h"
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class C>
|
||||
C
|
||||
@@ -28,15 +28,15 @@ make(int n)
|
||||
return c;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
std::priority_queue<MoveOnly> qo(std::less<MoveOnly>(), make<std::vector<MoveOnly> >(5));
|
||||
std::priority_queue<MoveOnly> q;
|
||||
q = std::move(qo);
|
||||
assert(q.size() == 5);
|
||||
assert(q.top() == MoveOnly(4));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "../../../../MoveOnly.h"
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class C>
|
||||
C
|
||||
@@ -28,13 +28,13 @@ make(int n)
|
||||
return c;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
std::priority_queue<MoveOnly> q(std::less<MoveOnly>(), make<std::vector<MoveOnly> >(5));
|
||||
assert(q.size() == 5);
|
||||
assert(q.top() == MoveOnly(4));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
int a[] = {3, 5, 2, 0, 6, 8, 1};
|
||||
const int n = sizeof(a)/sizeof(a[0]);
|
||||
std::priority_queue<MoveOnly> q(a+n/2, a+n,
|
||||
@@ -28,5 +28,5 @@ int main()
|
||||
std::vector<MoveOnly>(a, a+n/2));
|
||||
assert(q.size() == n);
|
||||
assert(q.top() == MoveOnly(8));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "../../../../MoveOnly.h"
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class C>
|
||||
C
|
||||
@@ -28,14 +28,14 @@ make(int n)
|
||||
return c;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
std::priority_queue<MoveOnly> qo(std::less<MoveOnly>(), make<std::vector<MoveOnly> >(5));
|
||||
std::priority_queue<MoveOnly> q = std::move(qo);
|
||||
assert(q.size() == 5);
|
||||
assert(q.top() == MoveOnly(4));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
std::priority_queue<Emplaceable> q;
|
||||
q.emplace(1, 2.5);
|
||||
assert(q.top() == Emplaceable(1, 2.5));
|
||||
@@ -28,5 +28,5 @@ int main()
|
||||
assert(q.top() == Emplaceable(3, 4.5));
|
||||
q.emplace(2, 3.5);
|
||||
assert(q.top() == Emplaceable(3, 4.5));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
std::priority_queue<MoveOnly> q;
|
||||
q.push(1);
|
||||
assert(q.top() == 1);
|
||||
@@ -28,5 +28,5 @@ int main()
|
||||
assert(q.top() == 3);
|
||||
q.push(2);
|
||||
assert(q.top() == 3);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ struct test
|
||||
|
||||
explicit test(const test_allocator<int>& a) : base(a) {}
|
||||
test(const container_type& c, const test_allocator<int>& a) : base(c, a) {}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test(container_type&& c, const test_allocator<int>& a) : base(std::move(c), a) {}
|
||||
test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test_allocator<int> get_allocator() {return c.get_allocator();}
|
||||
};
|
||||
|
||||
|
||||
@@ -36,10 +36,10 @@ struct test
|
||||
|
||||
explicit test(const test_allocator<int>& a) : base(a) {}
|
||||
test(const container_type& c, const test_allocator<int>& a) : base(c, a) {}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test(container_type&& c, const test_allocator<int>& a) : base(std::move(c), a) {}
|
||||
test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test_allocator<int> get_allocator() {return c.get_allocator();}
|
||||
};
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "../../../../test_allocator.h"
|
||||
#include "../../../../MoveOnly.h"
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class C>
|
||||
C
|
||||
@@ -47,13 +47,13 @@ struct test
|
||||
allocator_type get_allocator() {return this->c.get_allocator();}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test<MoveOnly> q(make<C>(5), test_allocator<MoveOnly>(4));
|
||||
assert(q.get_allocator() == test_allocator<MoveOnly>(4));
|
||||
assert(q.size() == 5);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "../../../../test_allocator.h"
|
||||
#include "../../../../MoveOnly.h"
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class C>
|
||||
C
|
||||
@@ -47,14 +47,14 @@ struct test
|
||||
allocator_type get_allocator() {return this->c.get_allocator();}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test<MoveOnly> q(make<C>(5), test_allocator<MoveOnly>(4));
|
||||
test<MoveOnly> q2(std::move(q), test_allocator<MoveOnly>(5));
|
||||
assert(q2.get_allocator() == test_allocator<MoveOnly>(5));
|
||||
assert(q2.size() == 5);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "../../../../MoveOnly.h"
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class C>
|
||||
C
|
||||
@@ -28,14 +28,14 @@ make(int n)
|
||||
return c;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
std::queue<MoveOnly> q(make<std::deque<MoveOnly> >(5));
|
||||
std::queue<MoveOnly> q2 = std::move(q);
|
||||
assert(q2.size() == 5);
|
||||
assert(q.empty());
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "../../../../MoveOnly.h"
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class C>
|
||||
C
|
||||
@@ -28,12 +28,12 @@ make(int n)
|
||||
return c;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
std::queue<MoveOnly> q(make<std::deque<MoveOnly> >(5));
|
||||
assert(q.size() == 5);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "../../../../MoveOnly.h"
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class C>
|
||||
C
|
||||
@@ -28,15 +28,15 @@ make(int n)
|
||||
return c;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
std::queue<MoveOnly> q(make<std::deque<MoveOnly> >(5));
|
||||
std::queue<MoveOnly> q2;
|
||||
q2 = std::move(q);
|
||||
assert(q2.size() == 5);
|
||||
assert(q.empty());
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
std::queue<Emplaceable> q;
|
||||
q.emplace(1, 2.5);
|
||||
q.emplace(2, 3.5);
|
||||
@@ -26,5 +26,5 @@ int main()
|
||||
assert(q.size() == 3);
|
||||
assert(q.front() == Emplaceable(1, 2.5));
|
||||
assert(q.back() == Emplaceable(3, 4.5));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
std::queue<MoveOnly> q;
|
||||
q.push(MoveOnly(1));
|
||||
assert(q.size() == 1);
|
||||
@@ -32,5 +32,5 @@ int main()
|
||||
assert(q.size() == 3);
|
||||
assert(q.front() == MoveOnly(1));
|
||||
assert(q.back() == MoveOnly(3));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ struct test
|
||||
|
||||
explicit test(const test_allocator<int>& a) : base(a) {}
|
||||
test(const container_type& c, const test_allocator<int>& a) : base(c, a) {}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test(container_type&& c, const test_allocator<int>& a) : base(std::move(c), a) {}
|
||||
test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test_allocator<int> get_allocator() {return c.get_allocator();}
|
||||
};
|
||||
|
||||
|
||||
@@ -36,10 +36,10 @@ struct test
|
||||
|
||||
explicit test(const test_allocator<int>& a) : base(a) {}
|
||||
test(const container_type& c, const test_allocator<int>& a) : base(c, a) {}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test(container_type&& c, const test_allocator<int>& a) : base(std::move(c), a) {}
|
||||
test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test_allocator<int> get_allocator() {return c.get_allocator();}
|
||||
};
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "../../../../test_allocator.h"
|
||||
#include "../../../../MoveOnly.h"
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class C>
|
||||
C
|
||||
@@ -47,13 +47,13 @@ struct test
|
||||
allocator_type get_allocator() {return this->c.get_allocator();}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test<MoveOnly> q(make<C>(5), test_allocator<MoveOnly>(4));
|
||||
assert(q.get_allocator() == test_allocator<MoveOnly>(4));
|
||||
assert(q.size() == 5);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "../../../../test_allocator.h"
|
||||
#include "../../../../MoveOnly.h"
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class C>
|
||||
C
|
||||
@@ -47,14 +47,14 @@ struct test
|
||||
allocator_type get_allocator() {return this->c.get_allocator();}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test<MoveOnly> q(make<C>(5), test_allocator<MoveOnly>(4));
|
||||
test<MoveOnly> q2(std::move(q), test_allocator<MoveOnly>(5));
|
||||
assert(q2.get_allocator() == test_allocator<MoveOnly>(5));
|
||||
assert(q2.size() == 5);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user