Boost logo

Boost :

Subject: [boost] [intrusive] crash with slist push_back
From: Arpan Sen (arpansen_at_[hidden])
Date: 2016-05-10 09:14:48

Hi Boost Dev,

Please consider the following code, this crashes with slist but works just
fine if I replace slist with list. Also flat_map crashes but std::map works
fine. Am I doing something gross or is there a bug here?

#include <iostream>
#include <boost/container/flat_map.hpp>
#include <map>
//#include <boost/intrusive/list.hpp>
#include <boost/intrusive/slist.hpp>

using namespace boost::intrusive;

struct m : public slist_base_hook<>
  int n;
    m(int k) : n(k) { }

int main()
  boost::container::flat_map<int, slist<m, cache_last<true> > > c1;
  std::map<int, slist<m, cache_last<true> > > c2;
  m* m1 = new m(22);

  m* tt = new m(99);


Boost list run by bdawes at, gregod at, cpdaniel at, john at