Boost C++ Libraries: Ticket #12534: flat_map fails to compile if included after type_traits is instantiated under gcc. https://svn.boost.org/trac10/ticket/12534 <p> Compiler gcc-5.4.0. </p> <pre class="wiki">#include &lt;boost/type_traits.hpp&gt; static const bool is_enum = boost::is_enum&lt;std::pair&lt;int, int&gt; &gt;::value; #include &lt;boost/container/flat_map.hpp&gt; boost::container::flat_map&lt;int, int&gt; m; </pre><p> error is: </p> <pre class="wiki">/boost/boost/container/detail/pair.hpp:433:8: error: partial specialization of ‘struct boost::is_enum&lt;std::pair&lt;_T1, _T2&gt; &gt;’ after instantiation of ‘struct boost::is_enum&lt;std::pair&lt;int, int&gt; &gt;’ [-fpermissive] </pre><p> Version 1.59.0 compiles fine. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12534 Trac 1.4.3 lars@… Tue, 15 Nov 2016 10:21:16 GMT <link>https://svn.boost.org/trac10/ticket/12534#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12534#comment:1</guid> <description> <p> I'm being bitten by this as well. Anyone have a fix? </p> </description> <category>Ticket</category> </item> <item> <author>lars@…</author> <pubDate>Tue, 15 Nov 2016 15:21:46 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12534#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12534#comment:2</guid> <description> <p> I've managed to <em>fix</em> it in my code base by add an include of boost/container/map.hpp early in the include chain. </p> </description> <category>Ticket</category> </item> <item> <author>matt@…</author> <pubDate>Tue, 22 Nov 2016 15:29:20 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12534#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12534#comment:3</guid> <description> <p> This affects us too. We don't have the flexibility to reorder header inclusions under all circumstances, so this is a pretty severe break for us. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ion Gaztañaga</dc:creator> <pubDate>Fri, 25 Nov 2016 22:57:44 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/12534#comment:4 https://svn.boost.org/trac10/ticket/12534#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> Thanks for the report. Those partial specializations are not longer needed so they are removed in the commit: </p> <p> <a class="ext-link" href="https://github.com/boostorg/container/commit/5e4a107e82ab3281688311d22d2bfc2fddcf84a3"><span class="icon">​</span>https://github.com/boostorg/container/commit/5e4a107e82ab3281688311d22d2bfc2fddcf84a3</a> </p> Ticket