libc++ vs libstdc++ std::is_move_assignable: Which is the most correct? : <p>I'm trying to get a deeper understanding of C++ by reading the C++14 standard along with the source of libc++ and libstdc++. The implementation of various <code>type_traits</code> items varies between the two, particularly <code>is_move_assignable</code>, and I'm trying to figure out which of them is "more correct."</p>

<p>libc++:</p>

<pre><code>template &lt;class _Tp&gt; struct is_move_assignable
    : public is_assignable&lt;typename add_lvalue_reference&lt;_Tp&gt;::type,
                           const typename add_rvalue_reference&lt;_Tp&gt;::type&gt; {};
</code></pre>

<p>libstdc++:</p>

<pre><code>template&lt;typename _Tp, bool = __is_referenceable&lt;_Tp&gt;::value&gt;
  struct __is_move_assignable_impl;

template&lt;typename _Tp&gt;
  struct __is_move_assignable_impl&lt;_Tp, false&gt;
  : public false_type { };

template&lt;typename _Tp&gt;
  struct __is_move_assignable_impl&lt;_Tp, true&gt;
  : public is_assignable&lt;_Tp&amp;, _Tp&amp;&amp;&gt;
  { };

template&lt;typename _Tp&gt;
  struct is_move_assignable
  : public __is_move_assignable_impl&lt;_Tp&gt;
  { };
</code></pre>

<p>The standard states:</p>

<blockquote>
  <p>For a referenceable type <code>T</code>, the same result as <code>is_assignable&lt;T&amp;, T&amp;&amp;&gt;::value</code>, otherwise <code>false</code>.</p>
</blockquote>

<p>The first thing I noted is that libc++ applies <code>const</code> to the second template parameter, which doesn't seem right since the move assignment operator takes a non-const rvalue. libstdc++ also uses <code>__is_referenceable</code>, which follows the wording of the standard, but libc++ doesn't. Is that requirement covered by libc++'s use of <code>add_lvalue_reference</code> and <code>add_rvalue_reference</code>, which both enforce <code>__is_referenceable</code> on their own?</p>

<p>I would really appreciate any insight into why each project chose their solutions!</p>
