41 #ifndef PB_DS_COND_DEALTOR_HPP
42 #define PB_DS_COND_DEALTOR_HPP
50 #define PB_DS_COND_DEALTOR_CLASS_T_DEC \
51 template<typename Entry, class Allocator>
53 #define PB_DS_COND_DEALTOR_CLASS_C_DEC \
58 template<
typename Entry,
class Allocator>
63 typename Allocator::template rebind<Entry>::other
66 typedef typename entry_allocator::pointer entry_pointer;
70 cond_dealtor(entry_pointer p_e);
81 bool m_no_action_destructor;
83 static entry_allocator s_alloc;
86 PB_DS_COND_DEALTOR_CLASS_T_DEC
87 typename PB_DS_COND_DEALTOR_CLASS_C_DEC::entry_allocator
88 PB_DS_COND_DEALTOR_CLASS_C_DEC::s_alloc;
90 PB_DS_COND_DEALTOR_CLASS_T_DEC
92 PB_DS_COND_DEALTOR_CLASS_C_DEC::
93 cond_dealtor(entry_pointer p_e) :
95 m_no_action_destructor(false)
98 PB_DS_COND_DEALTOR_CLASS_T_DEC
100 PB_DS_COND_DEALTOR_CLASS_C_DEC::
103 m_no_action_destructor =
true;
106 PB_DS_COND_DEALTOR_CLASS_T_DEC
108 PB_DS_COND_DEALTOR_CLASS_C_DEC::
111 if (m_no_action_destructor)
114 s_alloc.deallocate(m_p_e, 1);
117 #undef PB_DS_COND_DEALTOR_CLASS_T_DEC
118 #undef PB_DS_COND_DEALTOR_CLASS_C_DEC
124 #endif // #ifndef PB_DS_COND_DEALTOR_HPP