-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Labels
accepts-invalidc++17clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second partygood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute
Description
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};
}
Metadata
Metadata
Assignees
Labels
accepts-invalidc++17clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second partygood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute