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

    <tr>
        <th>Summary</th>
        <td>
            [clang] CTAD deduces alias template that does not satisfy the condition of the alias template
        </td>
    </tr>

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

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

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

<pre>
    The following code snippet fails `static_assert`, and the type of `i2` is inferred to be (as reported in the diagnostic message) `std::array<std::array<int, 3>, 1>`, which does not even constitute a legal `my_ints`.

Godbolt link: https://godbolt.org/z/1Mo9hz4W7 .

```c++
#include <array>
#include <type_traits>

template <int N>
using my_ints = std::array<int, N>;

int main() {
 my_ints i = {1, 2, 3};
    my_ints i2 = {i};
 static_assert(std::is_same_v<decltype(i2), decltype(i)>);
    // error: static assertion failed due to requirement 'std::is_same_v<std::array<std::array<int, 3>, 1>, std::array<int, 3>>'
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVE3P2zYM_jXyhWhg03EcH3zImzTDgG2nAjsGskTb3GQpk-S3SH_9IDtLmq69FBAkgHz48FOUIfBgiVpRvYnqlMk5js63v05XQ78RZZ3Tt_bTSNA7Y9xntgMopwmC5euVIvSSTQCxy0OUkdVFhkA-il0u8AjSaogjQbxdCVyfYIxilwMHYNuT96QhOugIBO5lAE9X5yNpYLsYapaDdSGygolCkAMJbFZvWpQHUR6k9_ImyuP_BGxjCqEU5cf0Fuldo_o8shpBOwpgXQR6JwvK2RA5zpFAgqFBmuRlul3YxiB2-UbkJ5Ef1vsXpztnIhi2f4vyAGOM15C841ngeVi1G-cHgecvAs_F764Zv2z_rOGFJoWzHCXwLZ1ViiVbZWZNIMrjPZuP39Olql6ilxzDE7HckaarkXFBsY3wx0M_h9TBe14gyhP8qHCLTfn2NW2imiRbgfulDfVd--DjhVHUb0ViwLX-9elBAwBPLP4H5hfI6xzh_hEfh0uQE13eRXnUpExKX-CeUWCTPH0tS6LU9-bF9dofIO-dT31bXcHqip1dhpk06JnSVHr6Z2ZPE9kIAuvvBvJzc4jHH5Z9wSVIfa98ffpmWjLdlropG5lRW9RFvs2LGptsbLHTUqm-VLt9j1VFqqg6aqp620nqd3mXcYs5bvOy2OZ1WWGzQVQ7jTtNvaJGSxTbnCbJZmPM-5QGOOMQZmr3VdFgZmRHJiyLAlEZaQeBmHaGbxP-QzcPQWxzwyGGJ0PkaJbtslpUJzh-OpxAk54VBZCGZYDHwMZRxufXDDJy6G_LKlDOal665PpF8GqZzd6033xEjuPcbZSbBJ5TPPfnw9W7v0hFgeclvSDwvGT4bwAAAP__DFyIhA">