Michael Marcin wrote:
At least under MSVC 8 I can do:
boost::array< boost::array
, 4 > foo = { -1,1, 0,0, 1,-1, 2,-2 }; or int foo[4][2] = { {-1,1}, {0,0}, {1,-1}, {2,-2} };
or
boost::array
foo[4] = { {-1,1}, {0,0}, {1,-1}, {2,-2} }; but not
boost::array< boost::array
, 4 > foo = { {-1,1}, {0,0}, {1,-1}, {2,-2} }; just wondering why this is the case.
To initialize a boost::array "by the book" you need double braces:
boost::array