libstc++-v3 vector not convertible to pointer
Joe Buck
jbuck@racerx.synopsys.com
Thu Nov 30 13:29:00 GMT 2000
> 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.
More information about the Gcc
mailing list