19 virtual void write_character(CharType c) = 0;
20 virtual void write_characters(
const CharType* s, std::size_t length) = 0;
25 template<
typename CharType>
29 template<
typename CharType>
35 void write_character(CharType c)
override
40 void write_characters(
const CharType* s, std::size_t length)
override
42 std::copy(s, s + length, std::back_inserter(v));
46 std::vector<CharType>& v;
50 template<
typename CharType>
56 void write_character(CharType c)
override
61 void write_characters(
const CharType* s, std::size_t length)
override
63 stream.write(s, static_cast<std::streamsize>(length));
67 std::basic_ostream<CharType>& stream;
71 template<
typename CharType>
77 void write_character(CharType c)
override
82 void write_characters(
const CharType* s, std::size_t length)
override
84 str.append(s, length);
88 std::basic_string<CharType>& str;
91 template<
typename CharType>