[ https://issues.apache.org/jira/browse/THRIFT-5342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17311028#comment-17311028 ]
Kashirin Alex commented on THRIFT-5342: --------------------------------------- Yes, it is correct the parent-task is the Pull-Request# (It could have been separate pull-requests) Thanks > Apply 'noexcept' attribute to Init/Copy/Move Constructors and Assignments > ------------------------------------------------------------------------- > > Key: THRIFT-5342 > URL: https://issues.apache.org/jira/browse/THRIFT-5342 > Project: Thrift > Issue Type: Sub-task > Components: C++ - Compiler > Reporter: Kashirin Alex > Assignee: Kashirin Alex > Priority: Major > Labels: pull-request-available > > The 'noexcept' attribute should be applied to the ctor & operator= for Copy & > Move in cases when all fields of t_struct's storage do not throw and the > Initializer ctor when no default values used. > > The cases of possible use of 'noexcept' can be seen with using the > compiler-flag `-Wnoexcept`, these are some of the gcc warnings: > > {code:java} > swc-db/src/cc/include/swcdb/thrift/gen-cpp/Service_types.h:2436:3: warning: > but ‘SWC::Thrift::FCellSerial::FCellSerial()’ does not throw; perhaps it > should be declared ‘noexcept’$ > 2436 | FCellSerial() : c(), ts(0) { > swc-db/src/cc/include/swcdb/thrift/gen-cpp/Service_types.cpp:2508:1: warning: > but ‘SWC::Thrift::SpecValueSerial_INT64::SpecValueSerial_INT64(const > SWC::Thrift::SpecValueSerial_INT64&)’ does not throw; perhaps it should be > declared ‘noexcept’ [-Wnoexcept] 2508 | > SpecValueSerial_INT64::SpecValueSerial_INT64(const SpecValueSerial_INT64& > other102) { | ^~~~~~~~~~~~~~~~~~~~~ > swc-db/src/cc/include/swcdb/thrift/gen-cpp/Broker.h:89:3: warning: but > ‘SWC::Thrift::BrokerProcessorFactory::BrokerProcessorFactory(const > std::shared_ptr<SWC::Thrift::BrokerIfFactory>&)’ does not throw; perhaps it > should be declared ‘noexcept’ [-Wnoexcept] 89 | BrokerProcessorFactory(const > ::std::shared_ptr< BrokerIfFactory >& handlerFactory) : | > ^~~~~~~~~~~~~~~~~~~~~~ > {code} > > * _The option "moveable_types" of the CPP-generator can be a suggestion for > a default_ > > -- This message was sent by Atlassian Jira (v8.3.4#803005)