Boost C++ Libraries: Ticket #11616: Spirit unsigned to signed int comparison https://svn.boost.org/trac10/ticket/11616 <p> The following code generates warnings in with gcc (-Wall) and MSVC. The warnings reference signed to unsigned int comparison. </p> <div class="wiki-code"><div class="code"><pre><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="kt">float</span><span class="o">&gt;</span> <span class="n">values</span><span class="p">;</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">line</span> <span class="o">=</span> <span class="s">&quot;111.2, 222.0, 333.3, 444.6, 555.5&quot;</span><span class="p">;</span> <span class="kt">bool</span> <span class="n">r</span> <span class="o">=</span> <span class="n">phrase_parse</span><span class="p">(</span><span class="n">line</span><span class="p">.</span><span class="n">begin</span><span class="p">(),</span> <span class="n">line</span><span class="p">.</span><span class="n">end</span><span class="p">(),</span> <span class="p">(</span><span class="n">float_</span> <span class="o">%</span> <span class="s">&quot;,&quot;</span><span class="p">)</span> <span class="p">,</span><span class="n">space</span><span class="p">,</span> <span class="n">values</span><span class="p">);</span> </pre></div></div><p> The warnings can be silenced by changing the problem variables from size_t to int as shown in the attached patch although I'm not sure this is an ideal solution. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11616 Trac 1.4.3 Duncan Paterson <duncan.paterson@…> Fri, 04 Sep 2015 09:51:47 GMT attachment set https://svn.boost.org/trac10/ticket/11616 https://svn.boost.org/trac10/ticket/11616 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">intpatch.patch</span> </li> </ul> Ticket Nikita Kniazev <nok.raven@…> Mon, 12 Mar 2018 18:37:23 GMT <link>https://svn.boost.org/trac10/ticket/11616#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11616#comment:1</guid> <description> <p> Was fixed in <a class="ext-link" href="https://github.com/boostorg/spirit/pull/140"><span class="icon">​</span>https://github.com/boostorg/spirit/pull/140</a> (Boost 1.60). </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joel de Guzman</dc:creator> <pubDate>Thu, 15 Mar 2018 22:59:14 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/11616#comment:2 https://svn.boost.org/trac10/ticket/11616#comment:2 <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> Ticket