Please sign in to comment.
Illegal read from istream into string
My 'optimization' for read from istream into string string str; str.resize( sz ); s.read( const_cast<char*>(str.data()), sz ); may lead to wrong data in str for some string implementations (like ref-counter implementation, as in libstdc++).
- Loading branch information...
Showing with 23 additions and 23 deletions.