Revert "Merge to upstream r304942."

This reverts commit 83b1388ecd, reversing
changes made to f20819f925.

Test: treehugger
Bug: None
This commit is contained in:
Dan Albert
2018-01-11 10:41:39 -08:00
parent ef7d5b4347
commit 38a0d5af7e
1110 changed files with 15077 additions and 19371 deletions

View File

@@ -15,7 +15,6 @@
#include <stack>
#include <cassert>
#include "test_macros.h"
#include "test_allocator.h"
struct test
@@ -25,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) {}
#if TEST_STD_VER >= 11
#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
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
test_allocator<int> get_allocator() {return c.get_allocator();}
};

View File

@@ -16,7 +16,6 @@
#include <cassert>
#include <cstddef>
#include "test_macros.h"
#include "test_allocator.h"
template <class C>
@@ -38,10 +37,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) {}
#if TEST_STD_VER >= 11
#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
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
test_allocator<int> get_allocator() {return c.get_allocator();}
};

View File

@@ -7,8 +7,6 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03
// <stack>
// template <class Alloc>
@@ -20,6 +18,7 @@
#include "test_allocator.h"
#include "MoveOnly.h"
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class C>
C
@@ -48,10 +47,13 @@ struct test
allocator_type get_allocator() {return this->c.get_allocator();}
};
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
int main()
{
#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_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -7,8 +7,6 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03
// <stack>
// template <class Alloc>
@@ -20,6 +18,7 @@
#include "test_allocator.h"
#include "MoveOnly.h"
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class C>
C
@@ -48,11 +47,14 @@ struct test
allocator_type get_allocator() {return this->c.get_allocator();}
};
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
int main()
{
#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_HAS_NO_RVALUE_REFERENCES
}