AMDG info-tibo wrote:
For this class I can't use base hooks - except if there are no solutions (for code design)...
I have another file with similar classes and a base hook, and it works, apparently because the list is defined in another class than in the class of the hook i.e, the following works flawlessly: class A { public: BaseHookType hook; } class B { public: List<BaseHookType,&A::hook> lst; }
Are there really no solutions to use member_hook
Apparently it works if you add an extra level of indirection: template<class> struct make_member_hook { typedef boost::intrusive::member_hook<EqualRefSystem,EqualRefSysHook,&EqualRefSystem::ERSMemberHook> type; }; //! Objects that reference this EqualRefSystem boost::intrusive::list< EqualRefSystem, typename make_member_hook<EqualRefSystem>::type, boost::intrusive::constant_time_size<false> > ReferencedBy; In Christ, Steven Watanabe