Boost C++ Libraries: Ticket #6729: boost/type_traits.hpp 1.49.0 does not compile with gcc 4.5.2 https://svn.boost.org/trac10/ticket/6729 <p> Programs including boost::multi_array do not compile with gcc 4.5.2. This can be reproduced by simply trying to include <code>boost/multi_array.hpp</code>. Minimal example: </p> <div class="wiki-code"><div class="code"><pre><span class="cp">#include</span> <span class="cpf">&lt;boost/multi_array.hpp&gt;</span><span class="cp"></span> <span class="kt">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span> </pre></div></div><p> This produces a lot of compiler errors such as </p> <pre class="wiki">In file included from /home/janitor/usr/include/boost/type_traits/has_bit_and.hpp:43:0, from /home/janitor/usr/include/boost/type_traits/has_operator.hpp:12, from /home/janitor/usr/include/boost/type_traits.hpp:35, from /home/janitor/usr/include/boost/multi_array.hpp:30, from /home/janitor/cascade/testing/binningClass/src/main.cpp:4: /home/janitor/usr/include/boost/type_traits/detail/has_binary_operator.hpp:221:29: error: expected constructor, destructor, or type conversion before ‘(’ token </pre><p> gcc version is 4.5.2: gcc (<a class="missing wiki">Ubuntu/Linaro</a> 4.5.2-8ubuntu4) 4.5.2<br /> System information: x86_64 GNU/Linux (2.6.38-13-generic) </p> <p> Using boost 1.42 the problem does not exist. Also the same code compiles with boost 1.49.0 and gcc 4.4.4 </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6729 Trac 1.4.3 Ronald Garcia Sat, 24 Mar 2012 02:37:00 GMT <link>https://svn.boost.org/trac10/ticket/6729#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6729#comment:1</guid> <description> <p> What happens if instead of multi_array.hpp you #include &lt;boost/type_traits.hpp&gt; </p> <p> ? Based on the error message, it looks like the problem might be isolated there. </p> </description> <category>Ticket</category> </item> <item> <author>janitor048@…</author> <pubDate>Sun, 25 Mar 2012 19:42:17 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6729#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6729#comment:2</guid> <description> <p> Yes, you are right. The problem occurs when I include &lt;boost/type_traits.hpp&gt;. Sorry, that I missed this in the compiler messages. Can you reassign it to the correct component? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ronald Garcia</dc:creator> <pubDate>Sun, 25 Mar 2012 22:59:09 GMT</pubDate> <title>owner, component, summary changed https://svn.boost.org/trac10/ticket/6729#comment:3 https://svn.boost.org/trac10/ticket/6729#comment:3 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Ronald Garcia</span> to <span class="trac-author">John Maddock</span> </li> <li><strong>component</strong> <span class="trac-field-old">multi_array</span> → <span class="trac-field-new">type_traits</span> </li> <li><strong>summary</strong> <span class="trac-field-old">boost::multi_array 1.49.0 does not compile with gcc 4.5.2</span> → <span class="trac-field-new">boost/type_traits.hpp 1.49.0 does not compile with gcc 4.5.2</span> </li> </ul> Ticket John Maddock Mon, 26 Mar 2012 08:22:21 GMT owner changed https://svn.boost.org/trac10/ticket/6729#comment:4 https://svn.boost.org/trac10/ticket/6729#comment:4 <ul> <li><strong>owner</strong> changed from <span class="trac-author">John Maddock</span> to <span class="trac-author">bronf</span> </li> </ul> <p> Reassigning owner. </p> Ticket Tim.Odenthal@… Thu, 18 Oct 2012 14:32:01 GMT <link>https://svn.boost.org/trac10/ticket/6729#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6729#comment:5</guid> <description> <p> The problem persists in boost 1_51_0, compiling with g++ (<a class="missing wiki">Ubuntu/Linaro</a> 4.6.1-9ubuntu3) 4.6.1... No fix yet? Since it's a several-line macro-call which obviously generates something deemed incorrect by g++, I have no reasonable way of debugging this myself... BTW. the error occurred trying to compile CGAL. </p> </description> <category>Ticket</category> </item> <item> <author>Tim.Odenthal@…</author> <pubDate>Thu, 18 Oct 2012 15:06:01 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6729#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6729#comment:6</guid> <description> <p> Changing to g++ and gcc version 4.4.6 didn't help in my case! </p> </description> <category>Ticket</category> </item> <item> <author>Tim.Odenthal@…</author> <pubDate>Tue, 12 Feb 2013 21:39:04 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6729#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6729#comment:7</guid> <description> <p> What did fix it in my case was completely deleting and re-installing the boost headers. Actually looking there, it must have been an old file which didn't define the macro needed... Strange stuff. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 09 Jun 2013 19:58:14 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6729#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6729#comment:8</guid> <description> <p> Could we close this ticket then? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Sun, 20 Apr 2014 16:05:02 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6729#comment:9 https://svn.boost.org/trac10/ticket/6729#comment:9 <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">invalid</span> </li> </ul> Ticket