 </p>
<p>
      A custom base class can be made for this idiom:
    </p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">streambuf</span><span class="special">&gt;</span>  <span class="comment">/* for std::streambuf */</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">ostream</span><span class="special">&gt;</span>    <span class="comment">/* for std::ostream */</span>

