Boost logo

Boost Users :

Subject: Re: [Boost-users] A forward iterator need not be default-constructible
From: Brian Allison (brian.w.allison_at_[hidden])
Date: 2011-09-30 10:21:16

2011/9/30 Krzysztof Żelechowski <giecrilj_at_[hidden]>

> Dave Abrahams wrote:
> > make it copyable, for example. A wrapper over a plain pointer could
> > initialize the pointer to 0. Now it's a valid past-the-end iterator
> > into an array of length zero. Such an iterator is also comparable with
> > other iterators into the same sequence. That's actually far from
> > being minimally singular.
> >
> I doubt there may be a sequence of length 0 at NULL. How would you
> allocate
> such a sequence?
That's not what he said.

As an aside though, recall that *char foo[0]; *is a valid declaration of a
zero-length aray.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at