Boost C++ Libraries: Ticket #11449: [C++11] is_polymorphic doesn't work with final-ed class in MSVC. https://svn.boost.org/trac10/ticket/11449 <p> Following code don't compile in MSVC 12 and 14 RC: I didn't test with other versions. </p> <div class="wiki-code"><div class="code"><pre><span class="cp">#include</span> <span class="cpf">&lt;type_traits&gt;</span><span class="cp"></span> <span class="cp">#include</span> <span class="cpf">&lt;boost/type_traits/is_polymorphic.hpp&gt;</span><span class="cp"></span> <span class="k">struct</span> <span class="n">S</span> <span class="k">final</span> <span class="p">{};</span> <span class="kt">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span> <span class="k">static_assert</span><span class="p">(</span><span class="o">!</span><span class="n">std</span><span class="o">::</span><span class="n">is_polymorphic</span><span class="o">&lt;</span><span class="n">S</span><span class="o">&gt;::</span><span class="n">value</span><span class="p">,</span> <span class="s">&quot;S should not be a polymorphic type&quot;</span><span class="p">);</span> <span class="c1">// works fine</span> <span class="k">static_assert</span><span class="p">(</span><span class="n">boost</span><span class="o">::</span><span class="n">is_polymorphic</span><span class="o">&lt;</span><span class="k">final</span><span class="o">&gt;::</span><span class="n">value</span><span class="p">,</span> <span class="s">&quot;hmm...&quot;</span><span class="p">);</span> <span class="c1">// hard error</span> <span class="p">}</span> </pre></div></div><p> <a href="https://svn.boost.org/trac10/attachment/ticket/11449/66bfcbfd052b0b94e6fe284d4a2ac78a.png" style="padding:0; border:none"><img crossorigin="anonymous" src="https://svn.boost.org/trac10/raw-attachment/ticket/11449/66bfcbfd052b0b94e6fe284d4a2ac78a.png" /></a> </p> <p> The error message says: </p> <blockquote> <p> 'boost::detail::is_polymorphic_impl1&lt;T&gt;::d1' cannot derive from 'S' because it is declared as 'final'. </p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11449 Trac 1.4.3 Kohei Takahashi <flast@…> Fri, 03 Jul 2015 09:04:04 GMT attachment set https://svn.boost.org/trac10/ticket/11449 https://svn.boost.org/trac10/ticket/11449 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">66bfcbfd052b0b94e6fe284d4a2ac78a.png</span> </li> </ul> Ticket John Maddock Tue, 07 Jul 2015 10:47:24 GMT <link>https://svn.boost.org/trac10/ticket/11449#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11449#comment:1</guid> <description> <p> Confirmed. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Tue, 07 Jul 2015 11:31:56 GMT</pubDate> <title>status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/11449#comment:2 https://svn.boost.org/trac10/ticket/11449#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> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.60.0</span> </li> </ul> <p> Fixed in <a class="ext-link" href="https://github.com/boostorg/type_traits/commit/04a8a9ecc2b02b7334a4b3f0459a5f62b855cc68"><span class="icon">​</span>https://github.com/boostorg/type_traits/commit/04a8a9ecc2b02b7334a4b3f0459a5f62b855cc68</a> </p> <p> Note this patch will almost certainly not make the next release. </p> Ticket