Debian Codegraph @

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

raw
1 // PR c++/84698
2 // { dg-do compile { target c++11 } }
3
4 template<typename A, typename B>
5 struct X {
6 void swap(X& o) noexcept { }
7
8 template<typename... Args>
9 friend void swap(X<Args...>& a, X<Args...>& b) noexcept(noexcept(a.swap(b)));
10 };
11
12 template<typename... Args>
13 inline void swap(X<Args...>& a, X<Args...>& b) noexcept(noexcept(a.swap(b)))
14 {
15 }
16
17 int
18 main ()
19 {
20 X<int, int> x;
21 }