ding when and how <CODE>close</CODE> is invoked are a bit messy:</P>

<A NAME="when"></A>
<H2>When is <CODE>close</CODE> invoked?</H2>

<H4><CODE>stream_buffer</CODE> and <CODE>stream</CODE></H4>

<P>When an instance of <CODE>stream_buffer</CODE> or <CODE>stream</CODE> based on a Device <CODE>d</CODE> is closed using member function <CODE>close</CODE>, the following sequence of functions calls is made:<P>
<PRE CLASS="broken_ie">    boost::iostreams::close(d, std::ios_base::in);
    boost::iostreams::close(d