
23 Mar
2005
23 Mar
'05
11:41 a.m.
On Wed, Mar 23, 2005 at 11:38:53AM +0000, Jonathan Wakely wrote:
On Wed, Mar 23, 2005 at 02:12:03PM +0300, Vladimir Prus wrote:
Applied. Interesting, I'd say that a std::string of more that 4GB is a terrible idea, performance wise, as many operations are linear on string size. Do you know why it's decided to make size_type 64bit?
size_t must be 64-bit or you couldn't request >4GB from new and malloc. IIRC std::string::size_type must be std::size_t.
AFAIK there's no requirement that std::string::max_size() == 4GB,
that should read "max_size() > 4GB" I'm typing a right old load of rubbish today, sorry! jon -- "Only two things are infinite: the universe and human stupidity, and I'm not sure about the former." - Albert Einstein