// 2008-06-15 Paolo Carlini <paolo.carlini@oracle.com>
-// Copyright (C) 2008-2017 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
try
{
string one;
- stof(one);
+ stof(one);
}
- catch(std::invalid_argument)
+ catch(const std::invalid_argument&)
{
test = true;
}
try
{
string one("a");
- stof(one);
+ stof(one);
}
- catch(std::invalid_argument)
+ catch(const std::invalid_argument&)
{
test = true;
}
try
{
string one("2.0a");
- f1 = stof(one, &idx1);
+ f1 = stof(one, &idx1);
}
catch(...)
{
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;
}
string one(to_string(ld1));
f1 = stof(one);
}
- catch(std::out_of_range)
+ catch(const std::out_of_range&)
{
test = true;
}