On 21/11/2013 09:15 PM, Warp wrote:
> Orchid Win7 v1<voi### [at] devnull> wrote:
>> The suggested solution? "Why don't you just use a std::vector<char>?"
>
>> Erm... because std::vector<char> /= char *. One is basically an
>> unstructured chunk of arbitrary memory, this other is a complex
>> implementation-dependent data structure.
>
> std::vector is not very implementation-dependent because the standard
> guarantees certain properties for it. One of these properties is that
> std::vector will always allocate contiguous memory (in the same way
> as 'new[]' does.)
The standard actually *promises* this? So there is literally only one
possible implementation for vector?
Wow. My mind is blown...
Post a reply to this message
|