]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/util/testsuite_rvalref.h
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / util / testsuite_rvalref.h
index 7e9729bbc9ab0ef4f72e6c22e609afa0956e63fa..1481d50e12431a1ad8ec9373ef3869f46be6f8db 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 // Testing utilities for the rvalue reference.
 //
-// Copyright (C) 2005-2016 Free Software Foundation, Inc.
+// Copyright (C) 2005-2020 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
@@ -43,7 +43,7 @@ namespace __gnu_test
 
     rvalstruct&
     operator=(int newval)
-    { 
+    {
       val = newval;
       valid = true;
       return *this;
@@ -53,7 +53,6 @@ namespace __gnu_test
 
     rvalstruct(rvalstruct&& in)
     {
-      bool test __attribute__((unused)) = true;
       VERIFY( in.valid == true );
       val = in.val;
       in.valid = false;
@@ -66,7 +65,6 @@ namespace __gnu_test
     rvalstruct&
     operator=(rvalstruct&& in)
     {
-      bool test __attribute__((unused)) = true;
       VERIFY( this != &in );
       VERIFY( in.valid == true );
       val = in.val;
@@ -76,7 +74,7 @@ namespace __gnu_test
     }
   };
 
-  inline bool 
+  inline bool
   operator==(const rvalstruct& lhs, const rvalstruct& rhs)
   { return lhs.val == rhs.val; }
 
@@ -87,7 +85,6 @@ namespace __gnu_test
   void
   swap(rvalstruct& lhs, rvalstruct& rhs)
   {
-    bool test __attribute__((unused)) = true;
     VERIFY( lhs.valid && rhs.valid );
     int temp = lhs.val;
     lhs.val = rhs.val;
@@ -103,7 +100,7 @@ namespace __gnu_test
     static int copycount;
     int val;
     bool valid;
-    
+
     copycounter() : val(0), valid(true)
     { }
 
@@ -112,32 +109,29 @@ namespace __gnu_test
 
     copycounter(const copycounter& in) : val(in.val), valid(true)
     {
-      bool test __attribute__((unused)) = true;
       VERIFY( in.valid == true );
       ++copycount;
     }
 
     copycounter(copycounter&& in) noexcept
     {
-      bool test __attribute__((unused)) = true;
       VERIFY( in.valid == true );
       val = in.val;
       in.valid = false;
       valid = true;
     }
-    
+
     copycounter&
     operator=(int newval)
-    { 
+    {
       val = newval;
       valid = true;
       return *this;
     }
 
     bool
-    operator=(const copycounter& in) 
+    operator=(const copycounter& in)
     {
-      bool test __attribute__((unused)) = true;
       VERIFY( in.valid == true );
       ++copycount;
       val = in.val;
@@ -148,20 +142,19 @@ namespace __gnu_test
     copycounter&
     operator=(copycounter&& in)
     {
-      bool test __attribute__((unused)) = true;
       VERIFY(in.valid == true);
       val = in.val;
       in.valid = false;
       valid = true;
       return *this;
     }
-    
+
     ~copycounter() noexcept
     { valid = false; }
   };
 
   int copycounter::copycount = 0;
-  
+
   inline bool
   operator==(const copycounter& lhs, const copycounter& rhs)
   { return lhs.val == rhs.val; }
@@ -173,7 +166,6 @@ namespace __gnu_test
   inline void
   swap(copycounter& lhs, copycounter& rhs)
   {
-    bool test __attribute__((unused)) = true;
     VERIFY( lhs.valid && rhs.valid );
     int temp = lhs.val;
     lhs.val = rhs.val;
@@ -192,14 +184,12 @@ namespace __gnu_test
     rvalstruct_compare_by_value(const rvalstruct_compare_by_value& rh)
     : val(rh.val), ok(rh.ok)
     {
-      bool test __attribute__((unused)) = true;
       VERIFY(rh.ok);
     }
 
     rvalstruct_compare_by_value&
     operator=(const rvalstruct_compare_by_value& rh)
     {
-      bool test __attribute__((unused)) = true;
       VERIFY( rh.ok );
       val = rh.val;
       ok = rh.ok;
@@ -209,7 +199,6 @@ namespace __gnu_test
     rvalstruct_compare_by_value(rvalstruct_compare_by_value&& rh)
     : val(rh.val), ok(rh.ok)
     {
-      bool test __attribute__((unused)) = true;
       VERIFY( rh.ok );
       rh.ok = false;
     }
@@ -217,7 +206,6 @@ namespace __gnu_test
     rvalstruct_compare_by_value&
     operator=(rvalstruct_compare_by_value&& rh)
     {
-      bool test __attribute__((unused)) = true;
       VERIFY( rh.ok );
       val = rh.val;
       ok = rh.ok;
@@ -230,7 +218,6 @@ namespace __gnu_test
   operator<(rvalstruct_compare_by_value lh,
            rvalstruct_compare_by_value rh)
   {
-    bool test __attribute__((unused)) = true;
     VERIFY( rh.ok );
     VERIFY( lh.ok );
     return lh.val < rh.val;
@@ -240,7 +227,6 @@ namespace __gnu_test
   order(rvalstruct_compare_by_value lh,
        rvalstruct_compare_by_value rh)
   {
-    bool test __attribute__((unused)) = true;
     VERIFY( rh.ok );
     VERIFY( lh.ok );
     return lh.val < rh.val;