[Boost-bugs] [Boost C++ Libraries] #1299: change in typedef stringstream_type in format_date_parser.hpp causing compilation error

Subject: [Boost-bugs] [Boost C++ Libraries] #1299: change in typedef stringstream_type in format_date_parser.hpp causing compilation error
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-10-05 01:37:42


#1299: change in typedef stringstream_type in format_date_parser.hpp causing
compilation error
------------------------------+---------------------------------------------
 Reporter: anonymous | Owner: az_sw_dude
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: date_time
  Version: Boost 1.34.1 | Severity: Showstopper
 Keywords: |
------------------------------+---------------------------------------------
 In format_date_parser.hpp, the typedef '''stringstream_type''' (in class
 format_date_parser) was defined as

 '''std::basic_stringstream<charT>'''

 in boost-1.33.0 but now has changed to

 '''std::basic_ostringstream<charT>'''

 in boost-1.34.1. This change now causes compilation error to any call to
 the function ->

   date_type[[BR]]
   parse_date(const string_type& value,[[BR]]
              const string_type& format_str,[[BR]]
              const special_values_parser<date_type,charT>& sv_parser)
 const[[BR]]
   {
     stringstream_type ss;[[BR]]
     ss << value;[[BR]]
     stream_itr_type sitr(ss); // THIS ERROR IS IN THIS LINE !!

     stream_itr_type stream_end;[[BR]]
     return parse_date(sitr, stream_end, format_str, sv_parser);[[BR]]
   }

 The compiler error (for boost-1.34.1) is ->

 '''format_date_parser.hpp:221: error: invalid conversion from `void*' to
 `std::basic_streambuf<char, std::char_traits<char> >*''''

 and is observed with multiple versions of gcc (3.4.x and 4.x).


 Here's a simple example ->

 {{{
 #include <sstream>
 int main()
 {
   typedef std::basic_ostringstream<char> stringstream_type;
   typedef std::istreambuf_iterator<char> stream_itr_type;

 stringstream_type ss;
 stream_itr_type itr(ss);
 return 0;
 }
 }}}

 The above program does not compile unless stringstream_type is changed to
 std::basic_stringstream<char>.

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1299>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:56 UTC