41#ifndef PB_DS_COND_DEALTOR_HPP
42#define PB_DS_COND_DEALTOR_HPP
51 template<
typename Entry,
typename _Alloc>
54 typedef rebind_traits<_Alloc, Entry> alloc_traits;
57 typedef typename alloc_traits::allocator_type entry_allocator;
58 typedef typename alloc_traits::pointer entry_pointer;
60 cond_dealtor(entry_pointer p_e)
61 : m_p_e(p_e), m_no_action_destructor(false) { }
65 if (m_no_action_destructor)
67 s_alloc.deallocate(m_p_e, 1);
72 { m_no_action_destructor =
true; }
76 bool m_no_action_destructor;
77 static entry_allocator s_alloc;
80 template<
typename Entry,
class _Alloc>
81 typename cond_dealtor<Entry, _Alloc>::entry_allocator
82 cond_dealtor<Entry, _Alloc>::s_alloc;
GNU extensions for policy-based data structures for public use.