1 // PR c++/84698
2 // { dg-do compile { target c++11 } }
3 
4 template<typename A, typename B>
5 struct X {
swapX6   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>
swap(X<Args...> & a,X<Args...> & b)13 inline void swap(X<Args...>& a, X<Args...>& b) noexcept(noexcept(a.swap(b)))
14 {
15 }
16 
17 int
main()18 main ()
19 {
20   X<int, int> x;
21 }
22