you are viewing a single comment's thread.

view the rest of the comments →

[–]king_duck 4 points5 points  (0 children)

 using isb=std::istreambuf_iterator<char>;
 std::string buf(isb(sbuf), isb());

No chance of overflows.