-
Notifications
You must be signed in to change notification settings - Fork 11k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class template
argument deduction with using
fails, apparently incorrectly
#73093
Comments
@llvm/issue-subscribers-c-17 Author: Ian Mallett (geometrian)
Consider the following simple C++20 example:
```cpp
template< class Tval, class Targ >
struct Foo {
Foo( Targ arg ) {}
};
template< class Targ > void test() {
This is a bit strange—it's true the —suggests that it should work, but I am not enough of a language lawyer to say for sure. |
@llvm/issue-subscribers-clang-frontend Author: Ian Mallett (geometrian)
Consider the following simple C++20 example:
```cpp
template< class Tval, class Targ >
struct Foo {
Foo( Targ arg ) {}
};
template< class Targ > void test() {
This is a bit strange—it's true the —suggests that it should work, but I am not enough of a language lawyer to say for sure. |
I think this is p1814r0, which is not yet implemented in clang. |
Confirmed: https://godbolt.org/z/74db3E5Tq |
@llvm/issue-subscribers-c-20 Author: Ian Mallett (geometrian)
Consider the following simple C++20 example:
```cpp
template< class Tval, class Targ >
struct Foo {
Foo( Targ arg ) {}
};
template< class Targ > void test() {
This is a bit strange—it's true the —suggests that it should work, but I am not enough of a language lawyer to say for sure. |
This is a missing feature in clang which is already tracking in #54051. I'm closing it as this is a duplication. |
@Backl1ght, I see you self-assigned to this issue, are you working on it? (I also have a plan to look at it). |
@hokein I'd like to work on it, but I have little time recently. I think it would be better if you can pick it up. |
Consider the following simple C++20 example:
GCC and MSVC compile it happily. However, Clang (tested 18.0.0 d328512) claims the
using
doesn't amount to a class template:This is a bit strange—it's true the
using
is not aclass
template
per-se, but it is an alias for one. Indeed, my reading of the documentation (emphasis mine):—suggests that it should work, but I am not enough of a language lawyer to say for sure.
The text was updated successfully, but these errors were encountered: