>From the header documentation in the stl_vector.h from our C++ library on Mac
>OS X:
/**
* Returns a pointer such that [data(), data() + size()) is a valid
* range. For a non-empty %vector, data() == &front().
*/
pointer
data()
{ return pointer(this->_M_impl._M_start); }
So it does state "For a non-empty %vector, data() == &front().", so I would
avoid this patch for now.
On Jul 20, 2010, at 2:43 PM, Sebastian Redl wrote:
>
> On Tue, 20 Jul 2010 16:32:39 -0500, William Lynch <[email protected]>
> wrote:
>> Actually, I was thinking about this patch. There is probably going to be
>> bad
>> behavior when the vector is empty (and capacity is zero?). Please don't
>> apply this unless data() also has that problem.
>
> It doesn't, or at least shouldn't. That's pretty much the point of data().
>
> Sebastian
>
> _______________________________________________
> lldb-dev mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev