1 // RUN: %clang_cc1 -std=c++2a -x c++ -verify %s 2 // expected-no-diagnostics 3 4 template<typename T, typename U> 5 constexpr static bool is_same_v = false; 6 7 template<typename T> 8 constexpr static bool is_same_v<T, T> = true; 9 10 namespace PR56154 { 11 template <int N> concept C0 = (N == 0); 12 template <int N, int N2> concept C0x = C0<N>; 13 template <int N1, int N2> concept C00 = C0x<N1, N2> && C0<N2>; 14 15 template<int N1, int N2> 16 struct A { 17 void f() requires C00<N1, N2>; 18 void f() requires C0x<N1, N2> = delete; 19 20 static short g() requires C00<N1, N2>; 21 static int g() requires C0x<N1, N2>; 22 }; h(A<0,0> a)23 void h(A<0, 0> a) { 24 a.f(); 25 static_assert(is_same_v<decltype(&A<0, 0>::g), short(*)()>); 26 } 27 } 28