K
Kevin Goodsell
I was unable to locate the answer to this question in the (draft)
Standard or in The C++ Standard Library (Josuttis). What should occur
when one attempts to increase the size of a container beyond its max_size()?
The closest thing I found to an answer was that the reserve() member of
std::basic_string and std::vector and the resize() member of
std::basic_string throw std::length_error if the new size exceeds
max_size(). This seems likely to apply to all "growing" operations of
all containers, and is consistent with the description of
std::length_error, but I can't find anything that explicitly states this.
Thanks.
-Kevin
Standard or in The C++ Standard Library (Josuttis). What should occur
when one attempts to increase the size of a container beyond its max_size()?
The closest thing I found to an answer was that the reserve() member of
std::basic_string and std::vector and the resize() member of
std::basic_string throw std::length_error if the new size exceeds
max_size(). This seems likely to apply to all "growing" operations of
all containers, and is consistent with the description of
std::length_error, but I can't find anything that explicitly states this.
Thanks.
-Kevin