Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70777 - in branches/release/libs/iostreams: . doc/classes
From: dnljms_at_[hidden]
Date: 2011-03-31 03:50:12


Author: danieljames
Date: 2011-03-31 03:50:11 EDT (Thu, 31 Mar 2011)
New Revision: 70777
URL: http://svn.boost.org/trac/boost/changeset/70777

Log:
Iostreams: Document Iostreams Code converter bug. Fixes #5242.

Properties modified:
   branches/release/libs/iostreams/ (props changed)
Text files modified:
   branches/release/libs/iostreams/doc/classes/code_converter.html | 31 +++++++++++++++++++++++--------
   1 files changed, 23 insertions(+), 8 deletions(-)

Modified: branches/release/libs/iostreams/doc/classes/code_converter.html
==============================================================================
--- branches/release/libs/iostreams/doc/classes/code_converter.html (original)
+++ branches/release/libs/iostreams/doc/classes/code_converter.html 2011-03-31 03:50:11 EDT (Thu, 31 Mar 2011)
@@ -66,10 +66,14 @@
     <SPAN CLASS="keyword">typedef</SPAN> <SPAN CLASS="keyword">typename</SPAN> Codecvt::intern_type char_type;
     <SPAN CLASS="keyword">typedef</SPAN> <SPAN CLASS="omitted">implementation-defined</SPAN> category;
     <A CLASS="documented" HREF="#constructors">code_converter</A>();
- <A CLASS="documented" HREF="#constructors">code_converter</A>( <SPAN CLASS="keyword">const</SPAN> Device& dev,
- std::streamsize buffer_size = <SPAN CLASS="omitted">default_value</SPAN> );
- <SPAN CLASS="keyword">void</SPAN> <A CLASS="documented" HREF="#open">open</A>( <SPAN CLASS="keyword">const</SPAN> Device& dev,
- std::streamsize buffer_size = <SPAN CLASS="omitted">default_value</SPAN> );
+ <A CLASS="documented" HREF="#constructors">code_converter</A>( <SPAN CLASS="keyword">const</SPAN> Device&amp; dev,
+ int buffer_size = <SPAN CLASS="omitted">default_value</SPAN> );
+ <A CLASS="documented" HREF="code_converter.html#constructors">code_converter</A>( <SPAN CLASS="omitted">device-constructor-args...</SPAN>,
+ int buffer_size = <SPAN CLASS="omitted">default_value</SPAN> );
+ <SPAN CLASS="keyword">void</SPAN> <A CLASS="documented" HREF="code_converter.html#open">open</A>( <SPAN CLASS="keyword">const</SPAN> Device&amp; dev,
+ int buffer_size = <SPAN CLASS="omitted">default_value</SPAN> );
+ <SPAN CLASS="keyword">void</SPAN> <A CLASS="documented" HREF="code_converter.html#open">open</A>( <SPAN CLASS="omitted">device-constructor-args...</SPAN>,
+ int buffer_size = <SPAN CLASS="omitted">default_value</SPAN> );
     <SPAN CLASS="keyword">bool</SPAN> <A CLASS="documented" HREF="#is_open">is_open</A>() <SPAN CLASS="keyword">const</SPAN>;
     <SPAN CLASS="keyword">void</SPAN> <A CLASS="documented" HREF="#close">close</A>();
     std::locale <A CLASS="documented" HREF="#imbue">imbue</A>(<SPAN CLASS="keyword">const</SPAN> std::locale& loc);
@@ -106,8 +110,10 @@
 <H4><CODE>code_converter::code_converter</CODE></H4>
 
 <PRE CLASS="broken_ie"> code_converter();
- code_converter( <SPAN CLASS="keyword">const</SPAN> Device& dev,
- std::streamsize buffer_size );</PRE>
+ code_converter( <SPAN CLASS="keyword">const</SPAN> Device&amp; dev,
+ int buffer_size );
+ code_converter( <SPAN CLASS="omitted">device-constructor-args...</SPAN>,
+ int buffer_size );</PRE>
     
 <P>
     The first member constructs a <CODE>code_converter</CODE> with no associated instance of the Device type <CODE>Device</CODE>. Before the instance can be used for i/o, the member function <CODE>open()</CODE> must be invoked.
@@ -117,6 +123,10 @@
     The second member constructs a <CODE>code_converter</CODE> based on the given instance of <CODE>Device</CODE>. The second parameter determines the size of the buffers or buffers used for code conversion. If a <CODE>std::codecvt</CODE> was specified as a template parameter, an instance of it will be default constructed. Otherwise, a copy of the global <CODE>locale</CODE> will be made, and an instance of <CODE>std::codecvt&lt;wchar_t, char, std::mbstate_t&gt;</CODE> will be fetched from it.
 </P>
 
+<P>
+ The third member constructs a <CODE>code_converter</CODE> based on the given instance of <CODE>Device</CODE> constructed with the forwarded arguments. Take care as the <CODE>buffer_size</CODE> can be confused for a constructor argument if it isn't an <CODE>int</CODE>.<br>
+</P>
+
 <A NAME="imbue"></A>
 <H4><CODE>code_converter::imbue</CODE></H4>
 
@@ -134,10 +144,15 @@
 <H4><CODE>code_converter::open</CODE></H4>
 
 <PRE CLASS="broken_ie"> <SPAN CLASS="keyword">void</SPAN> open( <SPAN CLASS="keyword">const</SPAN> Device& dev,
- std::streamsize buffer_size = <SPAN CLASS="omitted">default_value</SPAN> );</PRE>
+ std::streamsize buffer_size = <SPAN CLASS="omitted">default_value</SPAN> );
+ <SPAN CLASS="keyword">void</SPAN> open( <SPAN CLASS="omitted">device-constructor-args</SPAN>,
+ std::streamsize buffer_size = <SPAN CLASS="omitted">default_value</SPAN> );<br></PRE>
 
 <P>
- Assocaites the given instance of <CODE>Device</CODE> with <CODE>this</CODE> instance of <CODE>code_converter</CODE>, if there is no such instance currently associated; otherwise, throws <CODE>std::ios_base::failure</CODE>. The second parameter determines the size of the buffer or buffers used for code conversion. If a <CODE>std::codecvt</CODE> was specified as a template parameter, an instance of it will be default constructed. Otherwise, a copy of the global <CODE>locale</CODE> will be made, and an instance of <CODE>std::codecvt&lt;wchar_t, char, std::mbstate_t&gt;</CODE> will be fetched from it.
+ Associates the given instance of <CODE>Device</CODE> with <CODE>this</CODE> instance of <CODE>code_converter</CODE>, if there is no such instance currently associated; otherwise, throws <CODE>std::ios_base::failure</CODE>. The second parameter determines the size of the buffer or buffers used for code conversion. If a <CODE>std::codecvt</CODE> was specified as a template parameter, an instance of it will be default constructed. Otherwise, a copy of the global <CODE>locale</CODE> will be made, and an instance of <CODE>std::codecvt&lt;wchar_t, char, std::mbstate_t&gt;</CODE> will be fetched from it.
+</P>
+<P>
+ The second member constructs a <CODE>Device</CODE> with the forwarded arguments. Take care as the <CODE>buffer_size</CODE> can be confused for a constructor argument if it isn't an <CODE>int</CODE>.
 </P>
 
 <A NAME="is_open"></A>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk