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

    <tr>
        <th>Summary</th>
        <td>
            CTAD for alias templates fails with non-template explicit deduction guide
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            c++20,
            clang:frontend
      </td>
    </tr>

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

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

<pre>
    Example:
```cpp
template<typename T> struct A {
    A(T);
};

A(int) -> A<char>;

template<typename T>
using B = A<T>;

A a2(100);
B b2(100);

using A2 = A<char>;
using A2 = decltype(a2); // works

using B2 = B<char>;
using B2 = decltype(b2); // fails, deduces A<int>
```

https://godbolt.org/z/v5W1M4TKq
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0ks2umzAQhZ9m2FiJnDEEWLCA5LKpuovUtcET4taxKTb3p09fGe5fk14JAZoZf-f42NJ7PViiCrIGsmMi53BxUyVtkHYg45LOqZfq4VleR0MgauBH4DXs-fr047hWAl1HIwOBOISXkay8EjuBeGA-THMfWM0gb9ZRxhirAYsTYAnitQj58eN_eccRbQNgyTYRVIM49Bc5gXi4mfxKe-3OXtuBNQzEcWGc7gE1kwhY7Dj_bKlh3X-qn6E1vlNvnf0zoKg30RlgEYUijAG2gC17ctMvf09u1oXNl-TmjtzdkM9SGw94YIrU3JNfbMZA34J5P8TP8pcQRh_PeYEMTnXOhK2bBsD2D2D7mP3YfU9P334nqhKqFKVMqNrlu7wsyjItkkslM1GkKuUy74Xq-T7tS9pnRSZ36qyo6xJdIceU73ecC8zSYluKPOuyvBOKUupyCSmnq9Rma8zjNWon2vuZqjItMU-M7Mj45b4i9oANYIMcEAEPsWKkHUDU58nZQFbFRnZMpirCNt08eEi50T74D3zQwVB1ONVHdnYTk0ZLz95ulV-TZE86XJh1dvPWYPQ8Gt3rsCYctLNsmLWiZJ5MdROkDpe52_buCthG3dfPZpzcT-oDYLvs0QO26zYfK_wbAAD__zCLB-o">