Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Alexander_T_
Beginner
103 Views

Problem with compiling boost::intrusive::list with base_hook

Here is sample code, which compiles fine with both GCC and MSVC, but ICC 13.5 generates an error "error: invalid type conversion: "const B *" to "const boost::intrusive::detail::node_holder....."
[cpp] #include <boost/intrusive/list.hpp> class A { public: boost::intrusive::list>> m_list; }; //class B : public A, public boost::intrusive::list_base_hook<> {}; // to make possible compilation with icc, uncomment this line [/cpp]

0 Kudos
2 Replies
Alexander_T_
Beginner
103 Views

It seems this forum very dislike my code snippet. :)

Here is the corrected version:

[cpp]#include <boost/intrusive/list.hpp>

class A
{
public:
    boost::intrusive::list<class B, boost::intrusive::base_hook<boost::intrusive::list_base_hook<>>> m_list;
};

//class B : public A, public boost::intrusive::list_base_hook<> {}; // to make possible compilation with icc, uncomment this line
[/cpp]

SergeyKostrov
Valued Contributor II
103 Views

>>...It seems this forum very dislike my code snippet. :) There is some issue with Editor and it doesn't process correctly cases when #include ... directive is used. It is recommended to attach test codes instead.
Reply