]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 21_strings / basic_string / numeric_conversions / char / stof.cc
index 334c839564b5fc92b21918983950818112b117ac..3781c5b8dd11e7b53d14c973f1566e9b95590631 100644 (file)
@@ -3,7 +3,7 @@
 
 // 2008-06-15  Paolo Carlini  <paolo.carlini@oracle.com>
 
-// Copyright (C) 2008-2019 Free Software Foundation, Inc.
+// Copyright (C) 2008-2022 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
@@ -36,9 +36,9 @@ test01()
   try
     {
       string one;
-      stof(one);      
+      stof(one);
     }
-  catch(std::invalid_argument)
+  catch(const std::invalid_argument&)
     {
       test = true;
     }
@@ -51,9 +51,9 @@ test01()
   try
     {
       string one("a");
-      stof(one);      
+      stof(one);
     }
-  catch(std::invalid_argument)
+  catch(const std::invalid_argument&)
     {
       test = true;
     }
@@ -67,7 +67,7 @@ test01()
   try
     {
       string one("2.0a");
-      f1 = stof(one, &idx1);      
+      f1 = stof(one, &idx1);
     }
   catch(...)
     {
@@ -84,7 +84,7 @@ test01()
       one.append(2 * numeric_limits<float>::max_exponent10, '9');
       f1 = stof(one);
     }
-  catch(std::out_of_range)
+  catch(const std::out_of_range&)
     {
       test = true;
     }
@@ -118,7 +118,7 @@ test01()
          string one(to_string(ld1));
          f1 = stof(one);
        }
-      catch(std::out_of_range)
+      catch(const std::out_of_range&)
        {
          test = true;
        }