C++ Should this type satisfy std::is_copy_assignable?
<p>With following code:</p>

<pre><code>namespace _Detail
{
    struct _HasCopyAssignment
    {
        template &lt;typename _Type&gt;
        static auto test(_Type&amp;&amp; var) -&gt; decltype(var = var, std::true_type());
        static auto test(...) -&gt; decltype(std::false_type());
    };
}

template &lt;typename _Type&gt;
struct HasCopyAssignment : public decltype(_Detail::_HasCopyAssignment::test(std::declval&lt;_Type&gt;()))
{};
</code></pre>

<p>And this test type:</p>

<pre><code>struct B
{
    B&amp; operator=(B&amp;);
};
</code></pre>

<p>my <code>HasCopyAssignment&lt;B&gt;::value</code> evaluates to <code>true</code>, but <code>&lt;type_traits&gt;</code> test for <code>is_copy_assignable&lt;B&gt;::value</code> in GCC standard lib implementation is <code>false</code>. Should object be considered copy assignable if it's copy assignment operator take a non-const reference as parameter?</p>