10 May
2016
10 May
'16
1:14 p.m.
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; public: 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); c1[1].push_back(*m1); m* tt = new m(99); c2[1].push_back(*tt); } Regards Arpan