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

    <tr>
        <th>Summary</th>
        <td>
            Class `template` argument deduction with `using` fails, apparently incorrectly
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    Consider the following simple C++20 example:
```cpp
template< class Tval, class Targ >
struct Foo {
        Foo( Targ arg ) {}
};

template< class Targ >
using FooF = Foo< float, Targ >;

void test() {
        FooF foo( 6 );
}
```
GCC and MSVC compile it happily. However, Clang (tested 18.0.0 d3285123bc9c2e170c8aa7e418c132119bc7aaf1) claims the `using` doesn't amount to a class template:
```text
<source>:10:7: error: alias template 'FooF' requires template arguments; argument deduction only allowed for class templates
   10 |         FooF foo( 6 );
      |              ^
```
This is a bit strange—it's true the `using` is not a `class` `template` per-se, but it *is* an alias for one. Indeed, my reading of [the documentation](https://en.cppreference.com/w/cpp/language/class_template_argument_deduction#Deduction_for_alias_templates) (emphasis mine):
> When a function-style cast or declaration of a variable ***uses the name of an alias template*** A without an argument list as the type specifier, where A is defined as an alias of B<ArgList>, the scope of B is non-dependent, and B is either a class template or a similarly-defined alias template, ***deduction will proceed in the same way as for class templates***

—suggests that it *should* work, but I am not enough of a language lawyer to say for sure.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0VV2PozoS_TXOS6kjMEmAhzwkpLM70u7TjvY-tgq7AN9rbK5tOpN_f2WTj-6emQgpUD6Uj0-dKtB71RuiPdse2fa0wjkM1u17siMFp9CsWiuv-8YaryQ5CANBZ7W2F2V68GqcNEHD-JHxI8-AfmCMsOLAshPLDmyXLZeYpiUSaJw0BmJFA0Kj9_D9HTXjjyd0PbDidUH74GYR4GwtsPJ4y5nVZ2sZrxZswvM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