Boost logo

Boost Users :

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


On 11/09/2021 12:11, Joaquin M López Muñoz via Boost-users wrote:
>
> So, you have two options:
>
> * Make sure that elements are removed from lists before being destroyed
> * Activate auto-unlink mode for your lists
>

Thanks Jaoquin - after reading that article it looked like I'd need to
change all occurrences of:-

     public boost::intrusive::list_base_hook<>

to be this:-

     public boost::intrusive::list_base_hook<
boost::intrusive::link_mode<boost::intrusive::auto_unlink> >

but after doing that, all compiles now trigger a new assert in
'boost/intrusive/list.hpp':-

    //Constant-time size is incompatible with auto-unlink hooks!
    BOOST_STATIC_ASSERT(!(constant_time_size &&
                         ((int)value_traits::link_mode == (int)auto_unlink)
                       ));

After lunch I'll try homing in on it a bit closer - but is it possible
there's a particular #define needed for this to work?

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