use noexcept instead of throw() in compiler generated code
diff --git a/compiler/cpp/src/thrift/generate/t_cpp_generator.cc b/compiler/cpp/src/thrift/generate/t_cpp_generator.cc
index 3e8f728..0839302 100644
--- a/compiler/cpp/src/thrift/generate/t_cpp_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_cpp_generator.cc
@@ -1097,7 +1097,7 @@
}
if (tstruct->annotations_.find("final") == tstruct->annotations_.end()) {
- out << endl << indent() << "virtual ~" << tstruct->get_name() << "() throw();" << endl;
+ out << endl << indent() << "virtual ~" << tstruct->get_name() << "() noexcept;" << endl;
}
// Declare all fields
@@ -1226,7 +1226,7 @@
// Destructor
if (tstruct->annotations_.find("final") == tstruct->annotations_.end()) {
force_cpp_out << endl << indent() << tstruct->get_name() << "::~" << tstruct->get_name()
- << "() throw() {" << endl;
+ << "() noexcept {" << endl;
indent_up();
indent_down();
@@ -1598,7 +1598,7 @@
if (external) {
out << tstruct->get_name() << "::";
}
- out << "what() const throw()";
+ out << "what() const noexcept";
}
namespace struct_ostream_operator_generator {