Dear
all,
I'd like to float the idea to make it possible to
construct a
std::complex and a std::vector uninitialized. [..]
std::ifstream file("myfile.bin");
std::vector<char> buffer(buffer_size);
file.read(&buffer[0], buffer_size);
This is exactly the use case that
string::resize_for_overwrite solves. I think there is
already a proposal to add a similar function to
vector.
The committee has seen lots of proposals
for a tag that says to leave a container
uninitialised, and has always decided we don't want
that because it's too error-prone and risky.