|
|
|
|
|
by imron
3843 days ago
|
|
You're unlikely to have a std::vector containing 2 billion single byte elements however. Even being conservative, say you had a struct of size 24 bytes (e.g. 3 doubles x, y and z) then now you're up to 48G. So yes, there are very few situations where you'll have meaningful data that would fill a vector indexed by signed ints without running out of memory first. |
|
Can you imagine how stupid it would feel if you had to abandon all your std::vector-using code the moment you need to deal with an array bigger than 2 billion elements?