Subject: [Boost-bugs] [Boost C++ Libraries] #12468: real_parser failure
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-09-17 18:04:14
#12468: real_parser failure
---------------------------------+---------------------
Reporter: peter.koch.larsen@⦠| Owner: djowel
Type: Bugs | Status: new
Milestone: To Be Determined | Component: spirit
Version: Boost 1.61.0 | Severity: Problem
Keywords: |
---------------------------------+---------------------
The following program prints "4545000". Expected output: "4545".
#include <boost/spirit/home/qi.hpp>
#include <iostream>
using namespace boost::spirit::qi;
double as_double(std::string const& s)
{
double d;
auto begin = std::begin(s);
return phrase_parse(begin,std::end(s),double_,space,d)
? -1.0
: d;
}
void test()
{
std::cout << as_double("045.000W");
std::cout << as_double("045.000E");
}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12468> 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