]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/20_util/owner_less/cmp.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 20_util / owner_less / cmp.cc
index 6369da775894f218a8bb46b7817aafd8eb0348b1..98bb8a0deaf0cb4d7ca11d5787b1e3805d0e83be 100644 (file)
@@ -1,11 +1,12 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do run { target c++11 } }
+// { dg-require-effective-target hosted }
 
-// Copyright (C) 2008 Free Software Foundation
+// Copyright (C) 2008-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
 // terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
+// Free Software Foundation; either version 3, or (at your option)
 // any later version.
 
 // This library is distributed in the hope that it will be useful,
@@ -14,9 +15,8 @@
 // GNU General Public License for more details.
 
 // You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
 
 // 20.8.13.4 Template class owner_less [util.smartptr.ownerless]
 
@@ -33,16 +33,16 @@ struct B { A a[2]; };
 int
 test01()
 {
-    // test empty shared_ptrs compare equivalent
-    std::owner_less<std::shared_ptr<A>> less;
-    std::owner_less<std::weak_ptr<A>> wless;
-    std::shared_ptr<A> p1;
-    std::shared_ptr<A> p2;
-    VERIFY( !less(p1, p2) && !less(p2, p1) );
-    std::weak_ptr<A> p3;
-    VERIFY( !less(p1, p3) && !less(p3, p1) );
-    VERIFY( !wless(p1, p3) && !wless(p3, p1) );
-    return 0;
+  // test empty shared_ptrs compare equivalent
+  std::owner_less<std::shared_ptr<A>> less;
+  std::owner_less<std::weak_ptr<A>> wless;
+  std::shared_ptr<A> p1;
+  std::shared_ptr<A> p2;
+  VERIFY( !less(p1, p2) && !less(p2, p1) );
+  std::weak_ptr<A> p3;
+  VERIFY( !less(p1, p3) && !less(p3, p1) );
+  VERIFY( !wless(p1, p3) && !wless(p3, p1) );
+  return 0;
 }