14 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify -std=c++17 %s2// RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 %s3 4template <decltype(auto) a>5struct S { // expected-note {{previous definition is here}}6 static constexpr int i = 42;7};8 9template <decltype(auto) a>10struct S<a> { // expected-error {{class template partial specialization does not specialize any template argument; to define the primary template, remove the template argument list}} \11 // expected-error {{redefinition of 'S'}}12 static constexpr int i = 0;13};14