Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-05-31 16:56:58

christopher diggins wrote:
> "Jonathan Turkanis" <technews_at_[hidden]> wrote in message
> news:d7iigr$7tn$
>> 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.

I forgot that array allows N = 0 as a special case. Anyway, it has a completely
different meaning than "unitialized"

> 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.

Those functions are for consistency with the STL containers, as you mentioned
before. I'm don't see the contradiction.


Boost list run by bdawes at, gregod at, cpdaniel at, john at