1 // RUN: %clang_cc1 -verify %s 2 // RUN: %clang_cc1 -std=c++11 -verify %s 3 // RUN: %clang_cc1 -std=c++17 -verify %s 4 // RUN: %clang_cc1 -std=c++1z -verify %s 5 #if __cplusplus >= 201703 6 // expected-no-diagnostics 7 #endif 8 class A { 9 public: 10 static const char X; 11 }; 12 const char A::X = 0; 13 14 template<typename U> void func() noexcept(U::X); 15 16 template<class... B, char x> 17 #if __cplusplus >= 201703 18 void foo(void(B...) noexcept(x)) {} 19 #else 20 void foo(void(B...) noexcept(x)) {} // expected-note{{candidate template ignored}} 21 #endif 22 23 void bar() 24 { 25 #if __cplusplus >= 201703 26 foo(func<A>); 27 #else 28 foo(func<A>); // expected-error{{no matching function for call}} 29 #endif 30 } 31 32 33