title: Why are C++11 type traits not alias templates?
body: <blockquote>
    <p>Similar question: <a href="https://stackoverflow.com/q/8896637/1968">Why are <code>type_traits</code> implemented with specialized template structs instead of constexpr?</a> – but with a different answer.</p>
  </blockquote>
  
  <p>I realise that <a href="https://stackoverflow.com/q/6622452/1968">alias templates cannot be specialised</a> and hence can’t currently be used to implement type traits directly<sup>1</sup>. However, this is a conscious decision of the committee, and as far as I see there is no technical reason to forbid this.</p>
  
  <p>So wouldn’t it have made more sense to implement type traits as alias templates, streamlining their syntax?</p>
  
  <p>Consider</p>
  
  <pre><code> typename enable_if&lt;is_pointer&lt;T&gt;::value, size_t&gt;::type
   address(T p);
  </code></pre>
  
  <p>versus</p>
  
  <pre><code> enable_if&lt;is_pointer&lt;T&gt;, size_t&gt; address(T p);
  </code></pre>
  
  <p>Of course, this introduces a breaking interface change when moving from <a href="http://www.boost.org/doc/libs/1_49_0/libs/type_traits/doc/html/index.html" rel="nofollow noreferrer">Boost.TypeTraits</a> – but is this really such a big problem?</p>
  
  <p>After all, the code will need to be modified anyway since the types reside in different namespace and, as many modern C++ programmers are reluctant to open namespaces, will be qualified explicitly (if it would be changed at all).</p>
  
  <p>On the other hand, it vastly simplifies the code. And given that template metaprogramming often gets deeply nested, convoluted and complex, it seems obvious that a clearer interface is beneficial.</p>
  
  <p>Am I missing something? If not, I’d appreciate an answer that is not mere guesswork but relies on (and can cite) knowledge of the committee’s decision rationale.</p>
  
  <hr>
  
  <p><sup>1</sup> But very well indirectly! Consider:</p>
  
  <pre><code>template &lt;typename T&gt; using is_pointer = typename meta::is_pointer&lt;T&gt;::type;
  </code></pre>
  
  <p>Where <code>meta::is_pointer&lt;T&gt;</code> corresponds to the current <code>std::is_pointer&lt;T&gt;</code> type.</p>