Boost logo

Boost Users :

From: John Emmas (john_at_[hidden])
Date: 2021-09-11 10:50:59


Hi Ion and Jaoquin - our own code is obviously more complicated than my
examples and currently uses 'list_member_hook<>'.

This morning I modified it to use tags and then later (when that
wouldn't compile) I tried using 'list_base_hook<>' - but both cases
triggered a compile-time assertion here in
'boost/intrusive/detail/generic_hook.hpp':-

    BOOST_INTRUSIVE_FORCEINLINE void unlink()
    {
/* This line asserts ---> */ BOOST_STATIC_ASSERT((
(int)hooktags::link_mode == (int)auto_unlink ));
       node_ptr n(this->this_ptr());
       if(!node_algorithms::inited(n)){
          node_algorithms::unlink(n);
          node_algorithms::init(n);
       }
    }

I know you can't see the code but could either of you take a guess at
what kinda thing might trigger that assertion? There's a mention of
'link_mode' so could it be because we're using 'boost::intrusive::list'
with dynamic linkage maybe (i.e. in a DLL)? My previous examples
compiled okay but of course they were very simple examples just running
in an exe

Thanks for any suggestions, John


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net