Issue 125913
Summary Alias template CTAD is erroneously allowed in C++17 mode
Labels new issue
Assignees
Reporter PJBoy
    Alias template CTAD is a C++20 feature ( https://en.cppreference.com/w/cpp/compiler_support/20#cpp_deduction_guides_201907L ) recently introduced in clang v19. Seems it's being allowed in C++17 mode with no diagnostic ( https://godbolt.org/z/x7zdxnrqx ). Though a (almost correct) diagnostic is issued with the `-Wpre-c++17-compat` flag ( https://godbolt.org/z/acKsG3dfj ).

Testcase is replicated here
```
template<typename T, typename TT>
struct S
{
    T t;
    TT tt;
};

template<typename T, typename TT>
S(T, TT) -> S<T, TT>;

template<typename T>
using S_int = S<T, int>;

int main()
{
 (void) S_int{1, 2};
}
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to