mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 03:17:15 +02:00
Unordered: Starting to implement allocator propagation.
[SVN r73679]
This commit is contained in:
@ -103,7 +103,16 @@ namespace boost { namespace unordered { namespace detail {
|
|||||||
allocators_(a,a)
|
allocators_(a,a)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Need to move allocators_, not copy. But compressed_pair
|
||||||
|
// doesn't support move parameters.
|
||||||
|
buckets(buckets& b, move_tag m)
|
||||||
|
: buckets_(),
|
||||||
|
bucket_count_(b.bucket_count),
|
||||||
|
allocators_(b.allocators_)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
inline ~buckets()
|
inline ~buckets()
|
||||||
{
|
{
|
||||||
if(this->buckets_) { this->delete_buckets(); }
|
if(this->buckets_) { this->delete_buckets(); }
|
||||||
|
@ -34,7 +34,9 @@ namespace boost { namespace unordered { namespace detail {
|
|||||||
hasher const& hf, key_equal const& eq, value_allocator const& a)
|
hasher const& hf, key_equal const& eq, value_allocator const& a)
|
||||||
: table_base(n, hf, eq, a) {}
|
: table_base(n, hf, eq, a) {}
|
||||||
equivalent_table(equivalent_table const& x)
|
equivalent_table(equivalent_table const& x)
|
||||||
: table_base(x, x.node_alloc()) {}
|
: table_base(x,
|
||||||
|
allocator_traits<node_allocator>::
|
||||||
|
select_on_container_copy_construction(x.node_alloc())) {}
|
||||||
equivalent_table(equivalent_table const& x,
|
equivalent_table(equivalent_table const& x,
|
||||||
value_allocator const& a)
|
value_allocator const& a)
|
||||||
: table_base(x, a) {}
|
: table_base(x, a) {}
|
||||||
|
@ -203,7 +203,7 @@ namespace boost { namespace unordered { namespace detail {
|
|||||||
}
|
}
|
||||||
|
|
||||||
table(table& x, move_tag)
|
table(table& x, move_tag)
|
||||||
: buckets(x.node_alloc(), x.bucket_count_),
|
: buckets(boost::move(x.node_alloc()), x.bucket_count_),
|
||||||
functions(x),
|
functions(x),
|
||||||
size_(0),
|
size_(0),
|
||||||
mlf_(1.0f),
|
mlf_(1.0f),
|
||||||
|
@ -36,7 +36,9 @@ namespace boost { namespace unordered { namespace detail {
|
|||||||
value_allocator const& a)
|
value_allocator const& a)
|
||||||
: table_base(n, hf, eq, a) {}
|
: table_base(n, hf, eq, a) {}
|
||||||
unique_table(unique_table const& x)
|
unique_table(unique_table const& x)
|
||||||
: table_base(x, x.node_alloc()) {}
|
: table_base(x,
|
||||||
|
allocator_traits<node_allocator>::
|
||||||
|
select_on_container_copy_construction(x.node_alloc())) {}
|
||||||
unique_table(unique_table const& x, value_allocator const& a)
|
unique_table(unique_table const& x, value_allocator const& a)
|
||||||
: table_base(x, a) {}
|
: table_base(x, a) {}
|
||||||
unique_table(unique_table& x, move_tag m)
|
unique_table(unique_table& x, move_tag m)
|
||||||
|
Reference in New Issue
Block a user