]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/23_containers/headers/map/synopsis.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 23_containers / headers / map / synopsis.cc
index dc3c838f8b1b11e5cf63c07ccfd23f1f6b9e709b..e243c4b86a30903397d7bf271ebe5ebd0f13c75a 100644 (file)
@@ -1,7 +1,8 @@
 // { dg-do compile }
 // { dg-require-normal-mode "" }
+// { dg-require-normal-namespace "" }
 
-// Copyright (C) 2007-2013 Free Software Foundation, Inc.
+// Copyright (C) 2007-2024 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
 
 #include <map>
 
+#if __cplusplus >= 201103L
+# define NOTHROW(X) noexcept(X)
+#else
+# define NOTHROW(X)
+#endif
+
 namespace std {
   template <class Key, class T, class Compare, class Allocator>
     class map;
@@ -43,7 +50,8 @@ namespace std {
                     const map<Key,T,Compare,Allocator>& y);
   template <class Key, class T, class Compare, class Allocator>
     void swap(map<Key,T,Compare,Allocator>& x,
-              map<Key,T,Compare,Allocator>& y);
+              map<Key,T,Compare,Allocator>& y)
+      NOTHROW(noexcept(x.swap(y)));
 
   template <class Key, class T, class Compare, class Allocator>
     class multimap;
@@ -67,5 +75,6 @@ namespace std {
                     const multimap<Key,T,Compare,Allocator>& y);
   template <class Key, class T, class Compare, class Allocator>
     void swap(multimap<Key,T,Compare,Allocator>& x,
-              multimap<Key,T,Compare,Allocator>& y);
+              multimap<Key,T,Compare,Allocator>& y)
+      NOTHROW(noexcept(x.swap(y)));
 }