c++ - List of boost::Unique_Ptr objects -
why can not this?
typedef boost::interprocess::unique_ptr<queuelist, queuelistdeletor> uqlist; typedef boost::intrusive::list<uqlist> list; // compiler (vs 2003) complains
the queuelist class derives public boost::intrusive::list_base_hook<>
make part of intrusive linked list.
i want use unique_ptr able pass around object between threads , have 1 single thread have ownership of object @ time.
edit: errors:
error c2039: 'pointer' : not member of 'boost::intrusive::detail::default_list_hook' see declaration of 'boost::intrusive::detail::default_list_hook' see reference class template instantiation 'boost::intrusive::list_impl' being compiled [ config=boost::intrusive::listopt::value_traits,boost::intrusive::size_type::pack>::type,boost::intrusive::constant_time_size>::type>::size_type,true> ]
error c2039: 'const_pointer' : not member of 'boost::intrusive::detail::default_list_hook' see declaration of 'boost::intrusive::detail::default_list_hook'
queuelist may derived list_base_hook, uqlist isn't. since try create intrusive list of uqlist (which unique_ptr) , not intrusive list of queuelist objects, won't work.
Comments
Post a Comment