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 15:46:29
#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@â¦>):
The attached patch is against boost 1.55.0's lexical_cast.hpp.
This patch catches iterator_range objects and calls a version of
lexical_cast specialized on the correct internal char type.
The root cause is that the templates in the default lexical_cast function
do not consider iterator_range objects. It is more efficient to catch all
iterator_range objects in a specialized function.
Another issue which might be of concern is that the member variables start
and finish (start_ and finish_ would be a nice change) are pointers to
char types. Using an iterator abstraction would be more generic. It looks
like a big change at first peak, and its merits would have to evaluated
too.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8261#comment:2> 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