Opened 6 years ago
Closed 6 years ago
#12468 closed Bugs (fixed)
real_parser failure
Reported by: | Owned by: | Joel de Guzman | |
---|---|---|---|
Milestone: | To Be Determined | Component: | spirit |
Version: | Boost 1.61.0 | Severity: | Problem |
Keywords: | Cc: | peter.koch.larsen@… |
Description
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");
}
Note:
See TracTickets
for help on using tickets.
Fixed now in develop.