Boost C++ Libraries: Ticket #12468: real_parser failure https://svn.boost.org/trac10/ticket/12468 <p> The following program prints "4545000". Expected output: "4545". </p> <p> #include &lt;boost/spirit/home/qi.hpp&gt; #include &lt;iostream&gt; using namespace boost::spirit::qi; </p> <p> double as_double(std::string const&amp; s) { </p> <blockquote> <p> double d; </p> </blockquote> <blockquote> <p> auto begin = std::begin(s); </p> </blockquote> <blockquote> <p> return phrase_parse(begin,std::end(s),double_,space,d) </p> <blockquote> <p> ? -1.0 : d; </p> </blockquote> </blockquote> <p> } </p> <p> void test() { </p> <blockquote> <p> std::cout &lt;&lt; as_double("045.000W"); </p> </blockquote> <blockquote> <p> std::cout &lt;&lt; as_double("045.000E"); </p> </blockquote> <p> } </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12468 Trac 1.4.3 Joel de Guzman Sat, 17 Sep 2016 23:50:02 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/12468#comment:1 https://svn.boost.org/trac10/ticket/12468#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed now in develop. </p> Ticket