Boost C++ Libraries: Ticket #7825: boost::spirit::qi::int_parser<mpz_class> fails to compile on g++ 4.7.2 https://svn.boost.org/trac10/ticket/7825 <p> boost::spirit::qi::int_parser&lt;mpz_class&gt; fails to compile with g++ 4.7.2 in C++11 mode.<br /> It compiles successfully with g++ 4.6.3 and clang revision 170460.<br /> ( <a class="ext-link" href="http://gmplib.org/"><span class="icon">​</span>GMP</a> version is 5.0.5. ) </p> <p> Here's a program which reproduces the problem: </p> <pre class="wiki"> #include &lt;gmpxx.h&gt; #include &lt;boost/spirit/include/qi.hpp&gt; struct MyGrammar : boost::spirit::qi::grammar&lt;const char*&gt; { public: MyGrammar() : MyGrammar::base_type(integerRule) { integerRule %= integerParser; } boost::spirit::qi::rule&lt;const char*&gt; integerRule; boost::spirit::qi::int_parser&lt;mpz_class&gt; integerParser; }; int main() {} </pre><p> It compiled with:<br /> g++-4.7 -Wall -Wextra -pedantic bin/main.cpp -o main.o<br /> g++-4.6 -std=c++0x -Wall -Wextra -pedantic bin/main.cpp -o main.o<br /> clang++ -std=c++11 -Wall -Wextra -pedantic bin/main.cpp -o main.o<br /> </p> <p> It failed to compile with:<br /> g++-4.7 -std=c++11 -Wall -Wextra -pedantic bin/main.cpp -o main.o<br /> </p> <p> Error output: <a class="ext-link" href="http://pastebin.com/154hhVDn"><span class="icon">​</span>http://pastebin.com/154hhVDn</a> </p> <p> This is might be a problem in gcc, but I think this information is not sufficient for a gcc bug report. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7825 Trac 1.4.3 Nikita Kniazev <nok.raven@…> Mon, 12 Mar 2018 21:10:08 GMT <link>https://svn.boost.org/trac10/ticket/7825#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7825#comment:1</guid> <description> <p> It seems that it was a GMP bug (from the output log) and it has been fixed. Tested on Boost 1.52, GMP 6.1.0 with GCC 4.6.4 and Clang 3.3. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joel de Guzman</dc:creator> <pubDate>Thu, 15 Mar 2018 22:59:38 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7825#comment:2 https://svn.boost.org/trac10/ticket/7825#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