This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: libstc++-v3 vector not convertible to pointer


> Alexandre Oliva <aoliva@redhat.com> writes:
> 
> [...]
> 
> | ... IIRC, vectors have to be contiguous, even
> | though the Standard doesn't explicitly state that.
> 
> Strictly speaking there was no such requirement in the Standard.
> However that is issue is addressed in the first TC
> (yet-to-b-=published).

TC == "technical correction", I believe.

Right, when it was pointed out all the standards committee people realized
it was an accident; it was intended all along to be a requirement that
the elements of vector are contiguous, which means that &v[0] or &*v.begin()
can be passed to a C routine that wants a T* that points to v.size()
consecutive elements.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]