Que se passe-t-il exactement ici?Débordement de pile lors de l'allocation de tas
#include <boost/array.hpp>
#include <boost/assign/list_of.hpp>
struct Toy {
int m_data[100000];
};
struct Box {
Box()
: m_toys( boost::assign::list_of(Toy())(Toy())(Toy()) )
{}
boost::array<Toy,3> m_toys;
};
void main()
{
Box* box = new Box; // This causes stack overflow
}
+1 pour boost :: assign :: list_of. bon point! –