copyThe function template copy reads data from a given model of Source — or from a standard input stream or stream buffer — and writes it to a given model of Sink — or from a standard output stream or stream buffer — until the end of stream is reached. It returns the number of characters written.
The size of the temporary buffer used may be supplied as an optional parameter.
There are four overloads of copy to accommodate all combinations of Sources and Sinks, which are passed by const reference, and streams and stream buffers, which are passed by non-const reference.
<boost/iostreams/copy.hpp>namespace boost { namespace iostreams { template<typename Source, typename Sink> std::streamsize copy( [const] Source& src, [const] Sink& sink, std::streamsize buffer_size = default value ); } } // End namespace boost::io
Revised 20 May, 2004
© Copyright Jonathan Turkanis, 2004
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)