back_insert_device
The header <boost/iostreams/device/back_inserter.hpp> contains the definition of the class template back_insert_device — implementing a Sink which appends to a standard library sequence container — as well as the definition of a corresponding object generator, the function template boost::iostreams::back_inserter.
Although the Iostream Library recognizes specializations of the standard library template std::back_insert_iterator as models of Sink, appending to a container using a back_insert_device will often be more efficient since characters may be inserted several at a time.
<boost/iostreams/device/back_inserter.hpp>namespace boost { namespace iostreams { template<typename Container> class back_insert_device { public: typedef typename Container::value_type char_type; typedef sink_tag io_category; back_insert_device(Container& cnt); ... }; template<typename Container> back_insert_device<Container> back_inserter(Container& cnt); } } // End namespace boost::io
| Container | - | A C++ standard library sequence type ([ISO], 23.1.1). |
back_insert_device::back_insert_deviceback_insert_device(Container& cnt);
Constructs an instance of back_insert_device for appending to the given container. The given reference must remain valid for the lifetime of the instance of back_insert_device.
back_insertertemplate<typename Container> back_insert_device<Container> back_inserter(Container& cnt);
Returns an instance of back_insert_device for appending to the given container.
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)