From 98b4459da8e46eb8eeb41428018bb103a869f98e Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Wed, 5 Jun 2024 11:26:07 -0700 Subject: [PATCH] Fix deprecated dynamic exception in fbpcf/exception/exceptions.h +1 (#541) Summary: Pull Request resolved: https://github.com/facebookresearch/fbpcf/pull/541 LLVM has detected a violation of `-Wdeprecated-dynamic-exception-spec`. Dynamic exceptions were removed in C++17. This diff fixes the deprecated instance(s). See [Dynamic exception specification](https://en.cppreference.com/w/cpp/language/except_spec) and [noexcept specifier](https://en.cppreference.com/w/cpp/language/noexcept_spec). Reviewed By: palmje Differential Revision: D58182139 fbshipit-source-id: 23604f1d2732de4f94bf0b4bc157a2fe0111ba3b --- fbpcf/exception/exceptions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fbpcf/exception/exceptions.h b/fbpcf/exception/exceptions.h index de4bc589..db1cfb1e 100644 --- a/fbpcf/exception/exceptions.h +++ b/fbpcf/exception/exceptions.h @@ -169,7 +169,7 @@ class ConnectionError : virtual public std::exception { public: explicit ConnectionError(std::string msg) : msg_{msg} {} - const char* what() const throw() override { + const char* what() const noexcept override { return msg_.c_str(); }