]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/util/testsuite_api.h
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / util / testsuite_api.h
index 142f54417f2ea4c9c2dcfe4f7682b44fe1f749ea..d4edd2593b52b30532ddffe8aaa58c034eaaccab 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
-// Exception testing utils for the C++ library testsuite. 
+// Exception testing utils for the C++ library testsuite.
 //
-// Copyright (C) 2007-2013 Free Software Foundation, Inc.
+// Copyright (C) 2007-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
@@ -56,7 +56,7 @@ namespace __gnu_test
        : bad_non_virtual(), Exception("construct diamond") { }
       };
     };
-  
+
   template<typename Exception, bool DefaultCons>
     struct diamond_derivation
     : diamond_derivation_base<Exception, DefaultCons>
@@ -70,12 +70,11 @@ namespace __gnu_test
       // behavior is ambiguity.
       static void test()
       {
-       bool test __attribute__((unused)) = true;      
        try
          { throw error_type(); }
        catch (std::exception const&)
          { VERIFY( false ); }
-       catch (...) 
+       catch (...)
          { VERIFY( true ); }
       }
     };
@@ -93,7 +92,7 @@ namespace __gnu_test
     { return *this; }
 #endif
   };
+
   // See: 20.1.1 Template argument requirements.
   inline bool
   operator==(const NonDefaultConstructible&, const NonDefaultConstructible&)
@@ -114,18 +113,15 @@ namespace __gnu_test
   // For 26 numeric algorithms requirements, need addable,
   // subtractable, multiplicable.
   inline NonDefaultConstructible
-  operator+(const NonDefaultConstructible& lhs, 
-           const NonDefaultConstructible& rhs)
+  operator+(const NonDefaultConstructible&, const NonDefaultConstructible&)
   { return NonDefaultConstructible(1); }
 
   inline NonDefaultConstructible
-  operator-(const NonDefaultConstructible& lhs, 
-           const NonDefaultConstructible& rhs)
+  operator-(const NonDefaultConstructible&, const NonDefaultConstructible&)
   { return NonDefaultConstructible(1); }
 
   inline NonDefaultConstructible
-  operator*(const NonDefaultConstructible& lhs, 
-           const NonDefaultConstructible& rhs)
+  operator*(const NonDefaultConstructible&, const NonDefaultConstructible&)
   { return NonDefaultConstructible(1); }
 
   // Like unary_function, but takes no argument. (ie, void).
@@ -133,7 +129,7 @@ namespace __gnu_test
   template<typename _Result>
     struct void_function
     {
-      typedef _Result result_type; 
+      typedef _Result result_type;
 
       result_type
       operator()() const
@@ -143,7 +139,7 @@ namespace __gnu_test
   template<>
     struct void_function<NonDefaultConstructible>
     {
-      typedef NonDefaultConstructible result_type; 
+      typedef NonDefaultConstructible result_type;
 
       result_type
       operator()() const
@@ -152,7 +148,7 @@ namespace __gnu_test
 
   // For std::addressof, etc.
   struct OverloadedAddressAux { };
-  
+
   struct OverloadedAddress
   {
     OverloadedAddressAux