eina-cxx: Added move-constructors to lists

This commit is contained in:
Felipe Magno de Almeida 2014-07-17 21:45:25 -03:00
parent df1c03b56b
commit c4faec118e
2 changed files with 14 additions and 0 deletions

View File

@ -190,6 +190,8 @@ public:
typedef typename _base_type::reverse_iterator reverse_iterator;
typedef typename _base_type::const_reverse_iterator const_reverse_iterator;
list& operator=(list&& other) = default;
using _base_type::_base_type;
using _base_type::clear;
using _base_type::size;
@ -282,6 +284,8 @@ public:
insert(end(), other.begin(), other.end());
return *this;
}
list& operator=(list&& other) = default;
list(list&& other) = default;
using _base_type::clear;
using _base_type::size;
@ -438,6 +442,8 @@ public:
typedef typename _base_type::reverse_iterator reverse_iterator;
typedef typename _base_type::const_reverse_iterator const_reverse_iterator;
range_list& operator=(range_list&& other) = default;
using _base_type::_base_type;
using _base_type::clear;
using _base_type::size;
@ -502,6 +508,8 @@ public:
_base_type::_handle = other._handle;
return *this;
}
range_list& operator=(range_list&& other) = default;
range_list(range_list&& other) = default;
using _base_type::size;
using _base_type::empty;

View File

@ -326,6 +326,9 @@ struct _ptr_list_common_base
: _impl(_list)
{}
_ptr_list_common_base<T, CloneAllocator>& operator=(_ptr_list_common_base<T, CloneAllocator>&& other) = default;
_ptr_list_common_base(_ptr_list_common_base<T, CloneAllocator>&& other) = default;
/**
* @brief Default constructor. Create an empty list.
*
@ -431,6 +434,9 @@ public:
ptr_list(clone_allocator_type alloc)
: _base_type(alloc)
{}
ptr_list<T, CloneAllocator>& operator=(ptr_list<T, CloneAllocator>&& other) = default;
ptr_list(ptr_list<T, CloneAllocator>&& other) = default;
/**
* @brief Construct an list object with @p n copies of @p t.