]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/23_containers/forward_list/debug/swap.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 23_containers / forward_list / debug / swap.cc
index 0105791bedce7996e883d0b913a94b57285125a1..d90a543ef9faa47a869defaec6db575aacae91f9 100644 (file)
@@ -1,6 +1,6 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do run { target c++11 } }
 
-// Copyright (C) 2010 Free Software Foundation, Inc.
+// Copyright (C) 2010-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
@@ -9,7 +9,7 @@
 // any later version.
 
 // This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
 
@@ -26,7 +26,6 @@
 void
 test01()
 {
-  bool test __attribute__((unused)) = true;
   std::forward_list<int> fl1{1, 3, 5};
   std::forward_list<int> fl2{2, 4, 6};
 
@@ -54,10 +53,8 @@ test01()
   // before-begin iterator is not transfered:
   // TODO: Validate with LWG group how before begin should be
   // treated.
-#if !_GLIBCXX_DEBUG
   VERIFY( fit == fl1_its[0] );
-#endif
-  // All others are, even paste-the-end one:
+  // All other iterators are, even paste-the-end ones:
   for (size_t i = 1; i != fl2_its.size(); ++i)
   {
     VERIFY( ++fit == fl2_its[i] );
@@ -66,9 +63,7 @@ test01()
   fit = fl2.before_begin();
   // TODO: Validate with LWG group how before begin should be
   // treated.
-#if !_GLIBCXX_DEBUG
   VERIFY( fit == fl2_its[0] );
-#endif
   for (size_t i = 1; i != fl1_its.size(); ++i)
   {
     VERIFY( ++fit == fl1_its[i] );