
"Jonathan Turkanis" <technews@kangaroologic.com> wrote in message news:d7iigr$7tn$1@sea.gmane.org...
boost::array is just supposed to give built-in arrays a container interface. Built-in arrays never have size 0, so I don't see why boost::arrays should.
It would indicate that the array was not yet initialized and could help prevent erroneous use of uninitialized arrays. This behaviour is in fact implied by the fact that there exists an empty() function and separate size() and max_size() functions. The documentation IMO contradicts the intuitive interepretation of the class declaration.
compare:
boost::array<int, 2> ar = { { 1, 2, 3 } };
with
boost::array<int, 2> ar; initialize(ar) = 1, 2, 3;
I like the first one.
If operator=(T x) was defined then we could instead have the significantly better: boost::array<int, 2> ar; ar = 1, 2, 3; -- Christopher Diggins http://www.cdiggins.com