<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/129427>129427</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Unexpected behaviour - Clang does not consider a partial specialization with a concept more specialized than the primary template when the parameter order is changed.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          alkut
      </td>
    </tr>
</table>

<pre>
    Here is a link to the issue on Compiler Explorer: [Compiler Explorer](https://godbolt.org/z/zv1jcPaEW).

When we change the order of specialization parameters (#define SWAP_SPECIALIZATION_PARAMETERS 1), Clang produces the following error:

error: class template partial specialization is not more specialized than the primary template [-Winvalid-partial-specialization]

However, the error disappears if we keep the parameter order the same as in the primary template (#define SWAP_SPECIALIZATION_PARAMETERS 0).

Meanwhile, both GCC and MSVC compile both versions without errors or warnings
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUk0Fv6jgQxz-NcxmBEgdTOOSQ8mBfpe0uKt1F2ks12EPi1rEj24G2n35loELbfT30EEUZOzP_-c1_MATdWKKKiVsmfmQ4xNb5Cs3LELOdU2_VT_IEOgCC0fYFooPYpkAYCJyFhet6bcjD8rU3zpNnZQ1M3P4_Ln4wPmtj7AMra8ZXjK8ap3bOxLHzDeOr9_Qcime5xuWW8fmY5TXL621LFo4EskXb0Km684o8uD2EnqRGo98xamehR48dRfIBGJ8xXiraa0uw2dbrp816ubirf7_7p368-_OPp3X9UN8vH5cPGygYnzO-gIVB20DvnRokhVOlvTPGHbVtgLx3qbmzqI8vkAZDgEhdbzBSUhA1ms_CdADrInTO0_WIFMQW7alO73WH_u2aiInb0VbbAxqtRpeso_9mTURPYn66Ix3IpxZSrpM2UDpg3xP6AHqf-L0Q9edaH5QuHFMsYEeAAfRXcr6BM7_O7p7QHlttKGnbudjCb4sFoFVwv_l7AfJskvPJgXzQzgY46ti6IZ77COA8HNFbbZuQqapU83KOGVXFzSSf5xMuRNZWhSrklCshFJ_KYsqnCrmQU1VM5Y1UOc90xXMu8jLn-azMhRhLvhdiXhQllbMpnyCb5NShNmNjDl0yZHayeFXw-YTfZAZ3ZMLHlvgq3RrthiawSW50iOH6X9TRUPWXpdeeZCQFO2rxoN3gYXSxmHJ0NoR0Nug0A_zKOQkGYLooqf-Wg45pb341bx0uu6TG2eBN9WkndWyH3Vi6jvFVauryGvXePZOMjK9OZALjqwucQ8X_DQAA__8NgXPn">