Boost C++ Libraries: Ticket #11422: is_base<T, T> is broken on MSVC10 when T is not defined https://svn.boost.org/trac10/ticket/11422 <p> Currently on Windows with MSVC10 boost defines BOOST_IS_BASE_OF (which is used in is_base_and_derived, which is used in is_base_of) as follows: </p> <pre class="wiki">#define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) &amp;&amp; !is_same&lt;T,U&gt;::value) </pre><p> But microsoft's intrinsic <code>__is_base_of</code> cannot be used with the same type (i.e. T = U) when it (the type) is not defined. </p> <p> When the following is compiled </p> <pre class="wiki">class A; typedef typename boost::is_base_of&lt;A, A&gt;::type x; </pre><p> you get an error message: </p> <pre class="wiki">...\include\boost\type_traits\is_base_and_derived.hpp(228) : error C2139: 'A' : an undefined class is not allowed as an argument to compiler intrinsic type trait '__is_base_of' ...\include\boost\type_traits\is_base_of.hpp(29) : see reference to class template instantiation 'boost::detail::is_base_and_derived_impl&lt;B,D&gt;' being compiled with [ B=A, D=A ] </pre><p> The same code compiles on gcc-4.8.2 and clang-3.6. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11422 Trac 1.4.3 John Maddock Thu, 02 Aug 2018 11:38:27 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11422#comment:1 https://svn.boost.org/trac10/ticket/11422#comment:1 <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">duplicate</span> </li> </ul> <p> Moved to <a class="ext-link" href="https://github.com/boostorg/type_traits/issues/82"><span class="icon">​</span>https://github.com/boostorg/type_traits/issues/82</a> </p> Ticket