From 6ed4e7168f5457fae9508d8bb08f94b67a960847 Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Sat, 28 Mar 2020 14:27:18 -0400 Subject: [PATCH] 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 --- googletest/test/googletest-death-test_ex_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googletest/test/googletest-death-test_ex_test.cc b/googletest/test/googletest-death-test_ex_test.cc index 7ea5b946..7219680d 100644 --- a/googletest/test/googletest-death-test_ex_test.cc +++ b/googletest/test/googletest-death-test_ex_test.cc @@ -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) {