我已经声明了以下node
继承自boost::intrusive::slist_base_hook<>
:
class InputBufferSglNode : public boost::intrusive::slist_base_hook<>
包含这些节点的列表的声明:
class InputBufferSglList : public boost::intrusive::slist<InputBufferSglNode, boost::intrusive::cache_last<true>>
我想从成员函数中获取根节点InputBufferSglList
,所以我尝试这样做:
InputBufferSglNode* node = this->get_root_node();
但出现错误:
error: cannot initialize a variable of type 'InputBufferSglNode *' with an rvalue of type 'node_ptr' (aka 'boost::intrusive::slist_node<void *> *')
我应该投到node_ptr
吗InputBufferSglNode*
?应该是哪个铸件?