Boost C++ Libraries: Ticket #1931: Boost.Python headers won't compile with GCC 4.3 https://svn.boost.org/trac10/ticket/1931 <p> To reproduce this bug it is sufficient to compile this program: </p> <p> #include &lt;boost/python.hpp&gt; </p> <p> int main(int argc, char<strong> argv) { </strong></p> <blockquote> <p> return 0; </p> </blockquote> <p> } </p> <p> The following error is thrown: </p> <p> ../include/boost/python/detail/def_helper.hpp:192: error: declaration of 'typename boost::python::detail::keyword_extract&lt;boost::tuples::tuple&lt;const T1&amp;, const T2&amp;, const T3&amp;, const T4&amp;, boost::python::default_call_policies, boost::python::detail::keywords&lt;0u&gt;, const char*, void (boost::python::detail::not_specified::*)(), boost::tuples::null_type, boost::tuples::null_type&gt; &gt;::result_type boost::python::detail::def_helper&lt;T1, T2, T3, T4&gt;::keywords() const' ../include/boost/python/args_fwd.hpp:35: error: changes meaning of 'keywords' from 'struct boost::python::detail::keywords&lt;0u&gt;' </p> <p> The reason is that the name 'keyword' is used both for a struct (args_fwd.hpp, line 34) and for a function (detail/def_helper.hpp, line 189) in the same namespace. GCC 4.3 does not allow this. </p> <p> The fix is simple: rename either the struct or the function. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1931 Trac 1.4.3 vbe@… Mon, 19 May 2008 17:07:12 GMT <link>https://svn.boost.org/trac10/ticket/1931#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1931#comment:1</guid> <description> <p> I wanted to submit a patch, but it does not work: </p> <p> Internal Error </p> <p> Submission rejected as potential spam (Akismet says content is spam) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Thu, 22 May 2008 09:57:41 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/1931#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1931#comment:2</guid> <description> <p> FROM <a class="ext-link" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1968282&amp;group_id=165310&amp;atid=835077"><span class="icon">​</span>http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1968282&amp;group_id=165310&amp;atid=835077</a> ================================================================================== </p> <p> This is a bug in boost python, there are similar reports for other projects. </p> <p> If you want a quick workaround do: </p> <p> 1) /usr/include/boost/python/detail/def_helper.hpp: </p> <p> line 189: typename keyword_extract&lt;all_t&gt;::result_type keywords() const change to: typename keyword_extract&lt;all_t&gt;::result_type extract_keywords() const </p> <p> 2) /usr/include/boost/python/class.hpp: </p> <p> line 542: , helper.keywords() change to: , helper.extract_keywords() </p> <p> line 571: helper.default_implementation(), helper.policies(), helper.keywords()) change to: helper.default_implementation(), helper.policies(), helper.extract_keywords()) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>soc</dc:creator> <pubDate>Thu, 22 May 2008 10:17:34 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/1931#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1931#comment:3</guid> <description> <p> FROM <a class="ext-link" href="http://www.gnu.org/software/gcc/gcc-4.3/porting_to.html"><span class="icon">​</span>http://www.gnu.org/software/gcc/gcc-4.3/porting_to.html</a> </p> <p> <strong>Name lookup changes</strong> </p> <p> GCC 4.3 by default no longer accepts code such as </p> <pre class="wiki">template &lt;class _Tp&gt; class auto_ptr {}; template &lt;class _Tp&gt; struct counted_ptr { auto_ptr&lt;_Tp&gt; auto_ptr(); }; </pre><p> but will issue the diagnostic </p> <p> error: declaration of 'auto_ptr&lt;_Tp&gt; counted_ptr&lt;_Tp&gt;::auto_ptr()' error: changes meaning of 'auto_ptr' from 'class auto_ptr&lt;_Tp&gt;' </p> <p> The reference to struct auto_ptr needs to be qualified here, or the name of the member function changed to be unambiguous. </p> <pre class="wiki"> template &lt;class _Tp&gt; class auto_ptr {}; template &lt;class _Tp&gt; struct counted_ptr { ::auto_ptr&lt;_Tp&gt; auto_ptr(); }; </pre><p> In addition, -fpermissive can be used as a temporary workaround to convert the error into a warning until the code is fixed. Note that then in some case name lookup will not be standard conforming. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Dave Abrahams</dc:creator> <pubDate>Wed, 25 Jun 2008 00:48:09 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/1931#comment:4 https://svn.boost.org/trac10/ticket/1931#comment:4 <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> As far as I can tell this was fixed in <a class="changeset" href="https://svn.boost.org/trac10/changeset/39434" title="gcc 4.3.0 compatibility (resolves new &#34;changes meaning&#34; error)">[39434]</a> </p> Ticket