Boost logo

Boost Users :

From: Graham Reitz (graham.cpp_at_[hidden])
Date: 2008-07-21 12:00:28


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net