Re: [Boost-bugs] [Boost C++ Libraries] #8261: lexical_cast<unsigned> returns unexpected result when using with split_iterator<std::wstring::iterator>

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8261: lexical_cast<unsigned> returns unexpected result when using with split_iterator<std::wstring::iterator>
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-02-01 23:53:19


#8261: lexical_cast<unsigned> returns unexpected result when using with
split_iterator<std::wstring::iterator>
-------------------------------+--------------------------
  Reporter: s.a.moreno.a.s@… | Owner: apolukhin
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: lexical_cast
   Version: Boost 1.52.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+--------------------------

Comment (by Troy Korjuslommi <troykor@…>):

 I tried your stream_char_common specialization solution.
 Didn't work. Probably some typo or other brain fart type thing.
 The template should define wchar_t as the type, but it somehow doesn't.
 requires_stringbuf gets set to false in lexical_cast_stream_traits, which
 it shouldn't if the type is char or wchar_t.

 I have to look at it again later. Maybe it'll come to me after a break.
 Anyway, if you feel like having a go at it, here's the one that fails (but
 matches).

        template < class Traits, class Alloc, template<class,class> class
 Iter >
        struct stream_char_common< boost::iterator_range< Iter <wchar_t*,
 std::basic_string<wchar_t,Traits,Alloc> > > >
        {
           typedef wchar_t type;
        };

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8261#comment:5>
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:50:15 UTC