Boost C++ Libraries: Ticket #1524: format_date_parser.hpp(221) : cannot convert parameter 1 https://svn.boost.org/trac10/ticket/1524 <p> Forwarded from <a class="ext-link" href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=448576"><span class="icon">​</span>http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=448576</a> </p> <pre class="wiki">#include &lt;boost/date_time/gregorian/greg_date.hpp&gt; #include &lt;boost/date_time/format_date_parser.hpp&gt; #include &lt;boost/date_time/special_values_parser.hpp&gt; #include &lt;locale&gt; int main () { boost::date_time::format_date_parser&lt;boost::gregorian::date, char&gt; parser(std::string("%Y-%m-%d"), std::locale("C")); boost::date_time::special_values_parser&lt;boost::gregorian::date, char&gt; special_parser("a", "a", "a", "a", "a"); parser.parse_date("2007-01-01", "%Y-%m-%d", special_parser); return 0; } 1&gt;XBT Tracker.cpp 1&gt;c:\vc\misc\include\boost\date_time\format_date_parser.hpp(221) : error C2664: 'std::istreambuf_iterator&lt;_Elem,_Traits&gt;::istreambuf_iterator(std::basic_streambuf&lt;_Elem,_Traits&gt; *) throw()' : cannot convert parameter 1 from 'std::basic_ostringstream&lt;_Elem,_Traits,_Alloc&gt;' to 'std::basic_streambuf&lt;_Elem,_Traits&gt; *' 1&gt; with 1&gt; [ 1&gt; _Elem=char, 1&gt; _Traits=std::char_traits&lt;char&gt; 1&gt; ] 1&gt; No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called 1&gt; c:\vc\misc\include\boost\date_time\format_date_parser.hpp(218) : while compiling class template member function 'boost::gregorian::date boost::date_time::format_date_parser&lt;date_type,charT&gt;::parse_date(const std::basic_string&lt;_Elem,_Traits,_Ax&gt; &amp;,const std::basic_string&lt;_Elem,_Traits,_Ax&gt; &amp;,const boost::date_time::special_values_parser&lt;date_type,charT&gt; &amp;) const' 1&gt; with 1&gt; [ 1&gt; date_type=boost::gregorian::date, 1&gt; charT=char, 1&gt; _Elem=char, 1&gt; _Traits=std::char_traits&lt;char&gt;, 1&gt; _Ax=std::allocator&lt;char&gt; 1&gt; ] 1&gt; c:\vc\xbt\tracker\xbt tracker.cpp(10) : see reference to class template instantiation 'boost::date_time::format_date_parser&lt;date_type,charT&gt;' being compiled 1&gt; with 1&gt; [ 1&gt; date_type=boost::gregorian::date, 1&gt; charT=char 1&gt; ]}}} </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1524 Trac 1.4.3 Andrey Semashev Thu, 13 Nov 2008 17:54:23 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/1524#comment:1 https://svn.boost.org/trac10/ticket/1524#comment:1 <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 smr@… Mon, 16 Feb 2009 18:06:27 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/1524#comment:2 https://svn.boost.org/trac10/ticket/1524#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> This remains a problem with Boost 1.37. The error message from GNU C++ 4.3 is as follows. </p> <p> /usr/include/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;charT, std::char_traits&lt;_CharT&gt;, std::allocator&lt;_T2&gt; &gt;&amp;, const std::basic_string&lt;charT, 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]’: bug-448576.cxx:33: instantiated from here /usr/include/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;*’ /usr/include/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;]’ </p> Ticket Andrey Semashev Sun, 31 May 2009 11:44:44 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/1524#comment:3 https://svn.boost.org/trac10/ticket/1524#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> Duplicate for <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1299" title="#1299: Bugs: change in typedef stringstream_type in format_date_parser.hpp causing ... (closed: fixed)">#1299</a>. </p> Ticket