C++20 Concepts : Which template specialization gets chosen when the template argument qualifies for multiple concepts? : <p>Given :</p>

<pre><code>#include &lt;concepts&gt;
#include &lt;iostream&gt;

template&lt;class T&gt;
struct wrapper;

template&lt;std::signed_integral T&gt;
struct wrapper&lt;T&gt;
{
    wrapper() = default;
    void print()
    {
        std::cout &lt;&lt; "signed_integral" &lt;&lt; std::endl;
    }
};

template&lt;std::integral T&gt;
struct wrapper&lt;T&gt;
{
    wrapper() = default;
    void print()
    {
        std::cout &lt;&lt; "integral" &lt;&lt; std::endl;
    }
};

int main()
{
    wrapper&lt;int&gt; w;
    w.print(); // Output : signed_integral
    return 0;
}
</code></pre>

<p>From code above, <code>int</code> qualifies to both <code>std::integral</code> and <code>std::signed_integral</code> concept.</p>

<p>Surprisingly this compiles and prints "signed_integral" on both GCC and MSVC compilers. I was expecting it to fail with an error along the lines of "template specialization already been defined".</p>

<p>Okay, that's legal, fair enough, but why was <code>std::signed_integral</code> chosen instead of <code>std::integral</code>? Is there any rules defined in the standard with what template specialization gets chosen when multiple concepts qualify for the template argument?</p>
