Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
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:
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) : | ^~~~~~~~~~~~~~~~~~~~~~
- The option "moveable_types" of the CPP-generator can be a suggestion for a default