Change how node construction works.

Split node_constructor into two classes, one for constructing a node
without a value, and then another for holding it once the value is
constructed.

Do the work of constructing values in convenience functions in
allocate.hpp (construct_value_generic, construct_value, construct_pair).
This commit is contained in:
Daniel James committed 2016-08-14 20:55:40 +01:00
1 parent 609ae6cb4e
commit 8017d9e684
5 files changed
+247 -139

No files matched your search

+3 -1
View File
@@ -111,6 +111,8 @@ namespace boost { namespace unordered { namespace detail {
bucket_pointer;
typedef boost::unordered::detail::node_constructor<node_allocator>
node_constructor;
typedef boost::unordered::detail::node_tmp<node_allocator>
node_tmp;
typedef boost::unordered::iterator_detail::
iterator<node> iterator;
@@ -366,7 +368,7 @@ namespace boost { namespace unordered { namespace detail {
else if (bucket::extra_node)
{
node_constructor a(node_alloc());
a.construct();
a.create_node();
(constructor.get() +
static_cast<std::ptrdiff_t>(new_count))->next_ =