comparison gcc/testsuite/g++.dg/cpp0x/noexcept42.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
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 }