mirror of
https://github.com/google/googletest.git
synced 2024-12-28 11:10:44 +08:00
Replace the last instance of throw()
with noexcept
. NFC.
Fixes a -Wdeprecated warning. /home/travis/build/Quuxplusone/googletest/googletest/test/googletest-death-test_ex_test.cc:62:28: error: dynamic exception specifications are deprecated [-Werror,-Wdeprecated] const char* what() const throw() override { return "exceptional message"; } ^~~~~~~ /home/travis/build/Quuxplusone/googletest/googletest/test/googletest-death-test_ex_test.cc:62:28: note: use 'noexcept' instead const char* what() const throw() override { return "exceptional message"; } ^~~~~~~ noexcept
This commit is contained in:
parent
67cc66080d
commit
6ed4e7168f
@ -59,7 +59,7 @@ TEST(CxxExceptionDeathTest, ExceptionIsFailure) {
|
||||
|
||||
class TestException : public std::exception {
|
||||
public:
|
||||
const char* what() const throw() override { return "exceptional message"; }
|
||||
const char* what() const noexcept override { return "exceptional message"; }
|
||||
};
|
||||
|
||||
TEST(CxxExceptionDeathTest, PrintsMessageForStdExceptions) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user