Discussion about this post

User's avatar
Marius Mikučionis's avatar

When you have iterator and want a vector, you do not have to copy, just use the ctor or vector::assign, keep it simple :-)

return std::vector(std::istreambuf_iterator<char>{file}, std::streambuf_iterator<char>{});

Expand full comment
1 more comment...

No posts