10 Mar
2010
10 Mar
'10
8:20 p.m.
#include
#include using namespace boost::assign;
struct Foo { Foo() : m_a(list_of(1)(2)(3)(4)) {}
boost::array
m_a; }; Roman Perepelitsa.
Jeff
Thx this works. I was more hoping for a solution without a helper function (e.g. m_a({1, 2}), but that doesn't compile), but probably it doesn't exist. Got btw also a C4701 warning by uisng this construct. Haven't delved into it to see if it is a dangerous one.