Boost C++ Libraries: Ticket #1299: change in typedef stringstream_type in format_date_parser.hpp causing compilation error https://svn.boost.org/trac10/ticket/1299 <p> In format_date_parser.hpp, the typedef <strong>stringstream_type</strong> (in class format_date_parser) was defined as </p> <p> <strong>std::basic_stringstream&lt;charT&gt;</strong> </p> <p> in boost-1.33.0 but now has changed to </p> <p> <strong>std::basic_ostringstream&lt;charT&gt;</strong> </p> <p> in boost-1.34.1. This change now causes compilation error to any call to the function -&gt; </p> <blockquote> <p> date_type<br /> parse_date(const string_type&amp; value,<br /> </p> <blockquote> <p> const string_type&amp; format_str,<br /> const special_values_parser&lt;date_type,charT&gt;&amp; sv_parser) const<br /> </p> </blockquote> <p> { </p> <blockquote> <p> stringstream_type ss;<br /> ss &lt;&lt; value;<br /> stream_itr_type sitr(ss); <em> THIS ERROR IS IN THIS LINE !! </em></p> </blockquote> </blockquote> <blockquote> <blockquote> <p> stream_itr_type stream_end;<br /> return parse_date(sitr, stream_end, format_str, sv_parser);<br /> </p> </blockquote> <p> } </p> </blockquote> <p> The compiler error (for boost-1.34.1) is -&gt; </p> <p> <strong>format_date_parser.hpp:221: error: invalid conversion from `void*' to `std::basic_streambuf&lt;char, std::char_traits&lt;char&gt; &gt;*</strong>' </p> <p> and is observed with multiple versions of gcc (3.4.x and 4.x). </p> <p> Here's a simple example -&gt; </p> <pre class="wiki">#include &lt;sstream&gt; int main() { typedef std::basic_ostringstream&lt;char&gt; stringstream_type; typedef std::istreambuf_iterator&lt;char&gt; stream_itr_type; stringstream_type ss; stream_itr_type itr(ss); return 0; } </pre><p> The above program does not compile unless stringstream_type is changed to std::basic_stringstream&lt;char&gt;. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1299 Trac 1.4.3 michael.schumacher@… Wed, 28 May 2008 07:58:00 GMT <link>https://svn.boost.org/trac10/ticket/1299#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1299#comment:1</guid> <description> <p> I encountered the same error messsage when compiling with VC90 (MS Visual Studio 2008) and boost_1_35_0. After changing stringstream_type back to typedef std::basic_stringstream&lt;char&gt; (as in boost_1_33_1), it compiles again. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Andrey Semashev</dc:creator> <pubDate>Thu, 13 Nov 2008 17:53:33 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/1299#comment:2 https://svn.boost.org/trac10/ticket/1299#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket anonymous Mon, 19 Jan 2009 01:36:00 GMT status, version changed; resolution deleted https://svn.boost.org/trac10/ticket/1299#comment:3 https://svn.boost.org/trac10/ticket/1299#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.34.1</span> → <span class="trac-field-new">Boost 1.37.0</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> Hi, </p> <p> This bug seems to be still part of the 1.37.0 version of boost. </p> <p> 1.37.0_gcc4.3.2<em>include/boost-1_37/boost/date_time/format_date_parser.hpp: In member function 'date_type boost::date_time::format_date_parser&lt;date_type, charT&gt;::parse_date(const std::basic_string&lt;OutputT, std::char_traits&lt;_CharT&gt;, std::allocator&lt;_T2&gt; &gt;&amp;, const std::basic_string&lt;OutputT, std::char_traits&lt;_CharT&gt;, std::allocator&lt;_T2&gt; &gt;&amp;, const boost::date_time::special_values_parser&lt;date_type, charT&gt;&amp;) const [with date_type = boost::gregorian::date, charT = char]': Utilities.cpp:474: instantiated from here /1.37.0_gcc4.3.2</em>include/boost-1_37/boost/date_time/format_date_parser.hpp:221: error: invalid conversion from 'void*' to 'std::basic_streambuf&lt;char, std::char_traits&lt;char&gt; &gt;*' /sbcimp/run/pd/boost/64-bit/1.37.0_gcc4.3.2<em>include/boost-1_37/boost/date_time/format_date_parser.hpp:221: error: initializing argument 1 of 'std::istreambuf_iterator&lt;_CharT, _Traits&gt;::istreambuf_iterator(std::basic_streambuf&lt;_CharT, _Traits&gt;*) [with _CharT = char, _Traits = std::char_traits&lt;char&gt;]' </em></p> <p> Ramesh </p> Ticket Andrey Semashev Thu, 29 Jan 2009 05:49:38 GMT <link>https://svn.boost.org/trac10/ticket/1299#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1299#comment:4</guid> <description> <p> 1.37 did not include the fix. It is fixed in trunk and should go into 1.38. Please, check the recent checkout from branches/release. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Andrey Semashev</dc:creator> <pubDate>Sun, 31 May 2009 11:40:12 GMT</pubDate> <title>status, version changed; resolution set https://svn.boost.org/trac10/ticket/1299#comment:5 https://svn.boost.org/trac10/ticket/1299#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.37.0</span> → <span class="trac-field-new">Boost 1.38.0</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket