24 #ifndef CHAR_COUNTING_SINK
25 #define CHAR_COUNTING_SINK
26 #include <boost/iostreams/stream.hpp>
27 #include <boost/iostreams/categories.hpp>
40 typedef char char_type;
41 struct category:
public boost::iostreams::device_tag,
42 public boost::iostreams::output,
43 public boost::iostreams::multichar_tag,
44 public boost::iostreams::optimally_buffered_tag { };
49 inline std::streamsize write(
const char* s, std::streamsize n) {