21 Jul
2008
21 Jul
'08
4 p.m.
Is this a reasonable method to copy the contents of one asio::streambuf into another (i.e. in a copy constructor of a class that contains an asio::streambuf)? istreambuf_iterator<char> i( ostream_1.rdbuf() ); istreambuf_iterator<char> eos; // end-of-stream ostreambuf_iterator<char> o( ostream_2.rdbuf() ); std::copy( i, eos, o ); thanks, graham