xo-ordinaltree: use gc_allocator_traits

This commit is contained in:
Roland Conybeare 2025-12-01 14:33:41 -05:00
commit 4d2bc7f245
4 changed files with 8 additions and 8 deletions

View file

@ -278,8 +278,8 @@ namespace xo {
// allocator_type
using reference = value_type &;
using const_reference = value_type const &;
// pointer = std::allocator_traits<Allocator>::pointer;
// const_pointer = std::allocator_traits<Allocator>::const_pointer;
// pointer = xo::gc::gc_allocator_traits<Allocator>::pointer;
// const_pointer = xo::gc::gc_allocator_traits<Allocator>::const_pointer;
using const_iterator = detail::ConstIterator<Key, Value, Properties>;
// reverse_iterator
// const_reverse_iterator

View file

@ -109,7 +109,7 @@ namespace xo {
using value_type = std::pair<Key const, Value>;
// using key_compare = Compare // not yet
using allocator_type = Allocator;
using allocator_traits = std::allocator_traits<Allocator>;
using allocator_traits = xo::gc::gc_allocator_traits<Allocator>;
using ReducedValue = typename Reduce::value_type;
using RbUtil = detail::RbTreeUtil<Key, Value, Reduce>;
@ -118,8 +118,8 @@ namespace xo {
using RbTreeConstLhs = detail::RedBlackTreeConstLhs<RedBlackTree>;
using node_type = RbNode;
using node_allocator_type = typename std::allocator_traits<Allocator>::template rebind_alloc<node_type>;
using node_allocator_traits = std::allocator_traits<node_allocator_type>;
using node_allocator_type = typename xo::gc::gc_allocator_traits<Allocator>::template rebind_alloc<node_type>;
using node_allocator_traits = xo::gc::gc_allocator_traits<node_allocator_type>;
using Direction = detail::Direction;
using size_type = std::size_t;

View file

@ -47,7 +47,7 @@ namespace xo {
static Node * make_leaf(NodeAllocator& alloc,
value_type const & kv_pair,
ReducedValue const & leaf_rv) {
using traits = std::allocator_traits<NodeAllocator>;
using traits = xo::gc::gc_allocator_traits<NodeAllocator>;
// get memory
Node * node = traits::allocate(alloc, 1);

View file

@ -896,7 +896,7 @@ namespace xo {
using xo::xtag;
using xo::print::ccs;
using traits = std::allocator_traits<NodeAllocator>;
using traits = xo::gc::gc_allocator_traits<NodeAllocator>;
//constexpr char const *c_self = "RbTreeUtil::remove_black_leaf";
@ -1565,7 +1565,7 @@ namespace xo {
scope log(XO_DEBUG(debug_flag));
using traits = std::allocator_traits<NodeAllocator>;
using traits = xo::gc::gc_allocator_traits<NodeAllocator>;
RbNode * P = N->parent();