/usr/include/boost/iostreams/detail/adapter
Edit: /usr/include/boost/iostreams/detail/adapter/output_iterator_adapter.hpp (1416B)
// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
// (C) Copyright 2003-2007 Jonathan Turkanis
// 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.)
// See http://www.boost.org/libs/iostreams for documentation.
#ifndef BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED
#if defined(_MSC_VER)
# pragma once
#endif
#include
// copy.
#include // streamsize.
#include // tags.
#include
#include
namespace boost { namespace iostreams { namespace detail {
template
class output_iterator_adapter {
public:
BOOST_STATIC_ASSERT((is_convertible::value));
typedef Ch char_type;
typedef sink_tag category;
explicit output_iterator_adapter(OutIt out) : out_(out) { }
std::streamsize write(const char_type* s, std::streamsize n)
{
std::copy(s, s + n, out_);
return n;
}
private:
OutIt out_;
};
} } } // End namespaces detail, iostreams, boost.
#endif // #ifndef BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED //-----//