
15 May
2008
15 May
'08
10:53 a.m.
Hi, I have a class X : public intrusive::list_base_hook<> and would like to embed an additional member bool using the pointer_plus_bit. Can this be achieved using the value_traits somehow, and have the list working 'appropriately'? example code: #include <boost/function/function0.hpp> #include <boost/intrusive/list.hpp> #include <boost/intrusive/pointer_plus_bit.hpp> struct X : public boost::intrusive::list_base_hook<> { template<typename F> X(F const& f) : f_(f) {} boost::function0<void> f_; }; void foo() {} void test_intrusive() { typedef boost::intrusive::list<X> ilist; ilist list; list.push_back(*(new X(&foo))); X& x = list.back(); // How to set/get the bit on x? }; Thanks, Christian