mirror of
https://github.com/darlinghq/darling-libcxx.git
synced 2025-01-05 18:48:33 +00:00
Our test allocators support move/copy construction; they should support move/copy assignment as well
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@249458 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d06b33e5d0
commit
5142fe4401
@ -35,6 +35,8 @@ public:
|
|||||||
|
|
||||||
A1(const A1& a) TEST_NOEXCEPT : id_(a.id()) {copy_called = true;}
|
A1(const A1& a) TEST_NOEXCEPT : id_(a.id()) {copy_called = true;}
|
||||||
A1(A1&& a) TEST_NOEXCEPT : id_(a.id()) {move_called = true;}
|
A1(A1&& a) TEST_NOEXCEPT : id_(a.id()) {move_called = true;}
|
||||||
|
A1& operator=(const A1& a) TEST_NOEXCEPT { id_ = a.id(); copy_called = true; return *this;}
|
||||||
|
A1& operator=(A1&& a) TEST_NOEXCEPT { id_ = a.id(); move_called = true; return *this;}
|
||||||
|
|
||||||
template <class U>
|
template <class U>
|
||||||
A1(const A1<U>& a) TEST_NOEXCEPT : id_(a.id()) {copy_called = true;}
|
A1(const A1<U>& a) TEST_NOEXCEPT : id_(a.id()) {copy_called = true;}
|
||||||
@ -96,6 +98,8 @@ public:
|
|||||||
|
|
||||||
A2(const A2& a) TEST_NOEXCEPT : id_(a.id()) {copy_called = true;}
|
A2(const A2& a) TEST_NOEXCEPT : id_(a.id()) {copy_called = true;}
|
||||||
A2(A2&& a) TEST_NOEXCEPT : id_(a.id()) {move_called = true;}
|
A2(A2&& a) TEST_NOEXCEPT : id_(a.id()) {move_called = true;}
|
||||||
|
A2& operator=(const A2& a) TEST_NOEXCEPT { id_ = a.id(); copy_called = true; return *this;}
|
||||||
|
A2& operator=(A2&& a) TEST_NOEXCEPT { id_ = a.id(); move_called = true; return *this;}
|
||||||
|
|
||||||
T* allocate(std::size_t n, const void* hint)
|
T* allocate(std::size_t n, const void* hint)
|
||||||
{
|
{
|
||||||
@ -142,7 +146,9 @@ public:
|
|||||||
static bool destroy_called;
|
static bool destroy_called;
|
||||||
|
|
||||||
A3(const A3& a) TEST_NOEXCEPT : id_(a.id()) {copy_called = true;}
|
A3(const A3& a) TEST_NOEXCEPT : id_(a.id()) {copy_called = true;}
|
||||||
A3(A3&& a) TEST_NOEXCEPT: id_(a.id()) {move_called = true;}
|
A3(A3&& a) TEST_NOEXCEPT : id_(a.id()) {move_called = true;}
|
||||||
|
A3& operator=(const A3& a) TEST_NOEXCEPT { id_ = a.id(); copy_called = true; return *this;}
|
||||||
|
A3& operator=(A3&& a) TEST_NOEXCEPT { id_ = a.id(); move_called = true; return *this;}
|
||||||
|
|
||||||
template <class U, class ...Args>
|
template <class U, class ...Args>
|
||||||
void construct(U* p, Args&& ...args)
|
void construct(U* p, Args&& ...args)
|
||||||
|
Loading…
Reference in New Issue
Block a user