1 // RUN: %clang_cc1 -verify -std=c++20 -fsyntax-only %s 2 3 // expected-no-diagnostics 4 5 template <decltype(auto) a> 6 struct S { 7 static constexpr int i = 42; 8 }; 9 10 template <decltype(auto) a> requires true 11 struct S<a> { 12 static constexpr int i = 0; 13 }; 14 15 static constexpr int a = 0; 16 test()17void test() { 18 static_assert(S<a>::i == 0); 19 static_assert(S<(a)>::i == 0); 20 static_assert(S<((a))>::i == 0); 21 } 22