1 // PR c++/89612
2 // { dg-do compile { target c++11 } }
3 
4 template <typename>
5 struct C {
6   template <int N>
7   friend int foo() noexcept(N);
8 
9   template <int N>
10   friend int foo2() noexcept(N); // { dg-error "different exception" }
11 };
12 
13 template <int N>
14 int foo() noexcept(N);
15 
16 template <int N>
17 int foo2() noexcept(N + 1);
18 
19 C<int> c;
20