Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/noexcept91.C

raw
1 // PR c++/122668
2 // { dg-do compile { target c++11 } }
3
4 template<class T>
5 struct A {
6 friend void f1(A& a) noexcept(noexcept(a.g(0))) { }
7 friend void f2(A& a) noexcept(noexcept(A::g(0))) { }
8 static void g(int) noexcept;
9 };
10
11 int main() {
12 A<int> a;
13 static_assert(noexcept(f1(a)), "");
14 static_assert(noexcept(f2(a)), "");
15 }