mirror of
https://github.com/boostorg/container.git
synced 2026-02-25 04:12:27 +00:00
Refactor node implemenations from 3 (slist_node, list_node and tree_node) to a single base_node:
- To avoid unneeded includes, is_pair is factored out from pair.hpp implementation - Fixed bug where value_types inside nodes were not allocator-ware destructed. - Changed scoped utilities to handle new clases
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include <boost/container/detail/config_begin.hpp>
|
||||
#include <boost/container/detail/pair.hpp>
|
||||
#include <boost/container/detail/mpl.hpp>
|
||||
#include <boost/container/detail/is_pair.hpp>
|
||||
#include <boost/move/unique_ptr.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
|
||||
|
||||
@@ -140,15 +140,18 @@ struct node
|
||||
++count;
|
||||
}
|
||||
|
||||
~node()
|
||||
{
|
||||
--count;
|
||||
}
|
||||
template<class Alloc>
|
||||
void destructor(Alloc &)
|
||||
{ this->~node(); }
|
||||
|
||||
static unsigned int count;
|
||||
|
||||
static void reset_count()
|
||||
{ count = 0; }
|
||||
|
||||
~node()
|
||||
{ --count; }
|
||||
|
||||
};
|
||||
|
||||
template<class T1, class T2>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "propagate_allocator_test.hpp"
|
||||
#include "emplace_test.hpp"
|
||||
#include "../../intrusive/test/iterator_test.hpp"
|
||||
#include <utility> //for std::pair
|
||||
|
||||
using namespace boost::container;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user