[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Patch: auto_ptr is frequently abused in TSVN code

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Thu, 27 Aug 2009 16:55:24 +0200

On 27.08.2009 16:28, Stefan Fuhrmann wrote:

> Is there any guarantee that at least for the standard allocator
> &v[0]+1 is equivalent to&v[1] ? In other words, does the
> standard define that std::vector<> allocates a single,
> contiguous block of objects with the same alignment then
> new[] does?

Yes, std::vector<> allocates a single, continuous block as defined in
the C++ standard. If you want an array with a non continuous block
(e.g., to avoid problems if memory is too fragmented already and there
simply is no continuous block big enough available), you have to use
std::dequeue<>.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2387912
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-08-27 16:55:42 CEST

This is an archived mail posted to the TortoiseSVN Dev mailing list.