PR c++/84698
* g++.dg/cpp0x/noexcept42.C: New test.
From-SVN: r272443
2019-06-18 Marek Polacek <polacek@redhat.com>
+ PR c++/84698
+ * g++.dg/cpp0x/noexcept42.C: New test.
+
PR c++/71548
* g++.dg/cpp0x/variadic177.C: New test.
--- /dev/null
+// PR c++/84698
+// { dg-do compile { target c++11 } }
+
+template<typename A, typename B>
+struct X {
+ void swap(X& o) noexcept { }
+
+ template<typename... Args>
+ friend void swap(X<Args...>& a, X<Args...>& b) noexcept(noexcept(a.swap(b)));
+};
+
+template<typename... Args>
+inline void swap(X<Args...>& a, X<Args...>& b) noexcept(noexcept(a.swap(b)))
+{
+}
+
+int
+main ()
+{
+ X<int, int> x;
+}