CRTP std::is_default_constructible not working as expected
<pre><code>template &lt;class T&gt;
class Base {
     static_assert(!std::is_default_constructible&lt;T&gt;::value,
                   "T must not be default constructible");
};

struct X1 : Base&lt;X1&gt; {};
struct X2 : Base&lt;X2&gt; {
   X2() = default;
};
struct X3 : Base&lt;X3&gt; {
   X3() {};
};
struct X4 : Base&lt;X4&gt; {
   X4() : Base{} {};
};

struct Y1 {};

int main() {
    // all compile. They shouldn't
    X1 x1; X2 x2; X3 x3; X4 x4; 
    // all compile. They shouldn't:
    Base&lt;X1&gt; bx1; Base&lt;X2&gt; bx2; Base&lt;X3&gt; bx3; Base&lt;X4&gt; bx4;  

    Base&lt;Y1&gt; by1; // static assert fires. This is the expected behavior
}
</code></pre>

<p>The <code>static_assert</code> at class level doesn't fire for any of the <code>X</code> classes. But kicks in for <code>Y</code> (which doesn't derive <code>Base</code>)</p>

<p>It works correctly if the <code>static_assert</code> is moved inside the constructor of <code>Base</code></p>

<p>What is the reason that <code>is_default_constructible&lt;T&gt;</code> is always false at class level if <code>T</code> derives from <code>Base</code>?</p>

<p><a href="http://ideone.com/KIZh3Y" rel="nofollow">Ideone</a></p>