5 #include <boost/iostreams/filtering_stream.hpp>
6 #include <boost/iostreams/char_traits.hpp>
7 #include <boost/iostreams/concepts.hpp>
8 #include <boost/iostreams/operations.hpp>
14 namespace io = boost::iostreams;
18 :
public io::multichar_output_filter
34 template <
typename Sink>
36 write(Sink& dest,
const char* s, std::streamsize n)
39 for (z = 0; z < n; ++
z)
43 if (!io::put(dest,
'\\'))
46 if (!io::put(dest, c))
57 detail::io::filtering_ostream
59 backslashify(std::ostream&
os)
61 detail::io::filtering_ostream res;
64 return std::move(res);
std::streamsize write(Sink &dest, const char *s, std::streamsize n)
variadic_mul_mixin< detail::z_impl > z
std::ostringstream os
The output stream: the corresponding C++ snippet to compile.
backslashify_output_filter()