xref: /llvm-project/clang/test/SemaTemplate/class-template-noexcept.cpp (revision 9cfb138eccb83b5876928b08be346fde5ca78b47)
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 
6 class A {
7 public:
8   static const char X;
9 };
10 const char A::X = 0;
11 
12 template<typename U> void func() noexcept(U::X);
13 
14 template<class... B, char x>
foo(void (B...)noexcept (x))15 void foo(void(B...) noexcept(x)) {} // expected-note{{candidate template ignored}}
16 
bar()17 void bar()
18 {
19   foo(func<A>);	// expected-error{{no matching function for call}}
20 }
21