Destructors are noexcept(true) in C++11
With gcc/7.3.0
one gets the following warning due to the CLOSE_FILE
macro in LossDataSink
:
src/Classic/Structure/LossDataSink.cpp: In destructor 'LossDataSink::~LossDataSink()':
/scratch1/scratchdirs/frey_m/libs/opal/src/src/Classic/Structure/LossDataSink.cpp:100:70: warning: throw will always call terminate() [-Wterminate]
throw GeneralClassicException(std::string(__func__), ss.str()); \
^
/scratch1/scratchdirs/frey_m/libs/opal/src/src/Classic/Structure/LossDataSink.cpp:156:9: note: in expansion of macro 'CLOSE_FILE'
CLOSE_FILE ();
^
/scratch1/scratchdirs/frey_m/libs/opal/src/src/Classic/Structure/LossDataSink.cpp:100:70: note: in C++11 destructors default to noexcept
throw GeneralClassicException(std::string(__func__), ss.str()); \
As the warning explains: In C++11 destructors are noexcept(true)
by default. I'll fix this by setting the destructor noexcept(false)
explicitly.