Subject: [Boost-bugs] [Boost C++ Libraries] #12488: read_string_while duplicates character
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-09-28 09:17:28
#12488: read_string_while duplicates character
-----------------------------------------+----------------------------
Reporter: George <juergen.sawinski@â¦> | Owner: johnmaddock
Type: Bugs | Status: new
Milestone: To Be Determined | Component: multiprecision
Version: Boost 1.61.0 | Severity: Problem
Keywords: |
-----------------------------------------+----------------------------
Streaming, e.g. "1W" into a multiprecision number will correctly recognize
1, but the first character after the number will be duplicated (from "1W",
"WW" is left in the stream).
The cause is the line
is.rdbuf()->sputbackc(static_cast<char>(c));
in read_string_while. The character c does not have to be put back,
because snextc first advances position, then returns the character at new
position.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12488> 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:20 UTC