Re: [Interest] Qt container size()

2015-01-29 Thread Constantin Makshin
IMHO QByteArray is a much better candidate for that "position". On 01/30/2015 01:25 AM, André Pönitz wrote: > I would be willing to make an exception for QVector (and only that), > this could, or even should, be a lightweight "fullsize" container. > The portability reason carry less weight in this

Re: [Interest] Qt container size()

2015-01-29 Thread André Pönitz
On Thu, Jan 29, 2015 at 02:32:13PM +0100, Felix morack wrote: > Is there any reason for this? Why dont they use size_t like the STL and > the rest of the world? > > It's 2015, people will increasingly bump into this limitation - i just > did. If you have 2^31 items or more in a container you *nee

Re: [Interest] Qt container size()

2015-01-29 Thread André Somers
Felix morack schreef op 29-1-2015 om 14:32: > Hi, > > > Qt containers use 'int' to refer to their size thus limiting their > size to INT_MAX. > > Is there any reason for this? Why dont they use size_t like the STL > and the rest of the world? > > It's 2015, people will increasingly bump into this

Re: [Interest] Qt container size()

2015-01-29 Thread Felix morack
you can always use -1 as an error - even if signedness was an issue there is still qint64. 2015-01-29 14:36 GMT+01:00 Tomasz Siekierda : > On 29 January 2015 at 14:32, Felix morack wrote: > > Hi, > > > > > > Qt containers use 'int' to refer to their size thus limiting their size > to > > INT_MAX

Re: [Interest] Qt container size()

2015-01-29 Thread Tomasz Siekierda
On 29 January 2015 at 14:32, Felix morack wrote: > Hi, > > > Qt containers use 'int' to refer to their size thus limiting their size to > INT_MAX. > > Is there any reason for this? Why dont they use size_t like the STL and the > rest of the world? Basically this is so that -1 can be used as error

[Interest] Qt container size()

2015-01-29 Thread Felix morack
Hi, Qt containers use 'int' to refer to their size thus limiting their size to INT_MAX. Is there any reason for this? Why dont they use size_t like the STL and the rest of the world? It's 2015, people will increasingly bump into this limitation - i just did. I very much prefer QTL over STL for