Just re-ran it on a personal linux box: max_size is 18446744073709551615 (which happens to be std::numeric_limits<std::size_t>::max())
[...]
attempting sz = 4294967296
attempting sz = 8589934592
attempting sz = 17179869184 (my box starts swapping)
attempting sz = 34359738368 (that's too much, I only have 24 GB ram)
terminate called after throwing an instance of 'std::bad_alloc'
When I asked mine, it also said 2GB. *Might* be an issue actually, is there any way to up that limit?
max_size is typically literally the maximum integer value that can be used as the index, which means it cannot be surpassed without writing your own container or switching the development environment to one where size_t is 64 bit