]> 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 440ac76a7a1101e2f1de214b2a20b6487eee2247..98bb8a0deaf0cb4d7ca11d5787b1e3805d0e83be 100644 (file)
@@ -1,6 +1,7 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do run { target c++11 } }
+// { dg-require-effective-target hosted }
 
-// Copyright (C) 2008, 2009 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
@@ -32,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;
 }