This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit e42cf5023e3fc7fddf7e6f897aa1fb7d4a090afc
Author: cyy <cyye...@outlook.com>
AuthorDate: Sat Jan 5 10:05:48 2019 +0800

    use noexcept instead of throw() in compiler generated code
---
 compiler/cpp/src/thrift/generate/t_cpp_generator.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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 @@ void 
t_cpp_generator::generate_struct_declaration(ostream& out,
   }
 
   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 @@ void t_cpp_generator::generate_struct_definition(ostream& 
out,
   // 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 @@ void 
t_cpp_generator::generate_exception_what_method_decl(std::ostream& out,
   if (external) {
     out << tstruct->get_name() << "::";
   }
-  out << "what() const throw()";
+  out << "what() const noexcept";
 }
 
 namespace struct_ostream_operator_generator {

Reply via email to