Subject: [Boost-bugs] [Boost C++ Libraries] #12190: Intrusive List + Flat Map combination crashes
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-05-11 14:09:57
#12190: Intrusive List + Flat Map combination crashes
------------------------------+------------------------
Reporter: arpansen@⦠| Owner: igaztanaga
Type: Bugs | Status: new
Milestone: To Be Determined | Component: container
Version: Boost 1.59.0 | Severity: Problem
Keywords: |
------------------------------+------------------------
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);
}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12190> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC