warning: dynamic exception specifications are deprecated in C++11

The name for the macro ITK_NOEXCEPT_OR_THROW must not change. Supporting multiple legacy names is going to be significantly more confusing than the current name you don’t get (yet).

You can see where the naming came from by looking at the code:

This macro produces the proper function specification for C++03, and C++11. I’d blame C++03 for the convention of having to use “throw()” to specify no exception.

ITK_NOEXCEPT does not provide a C++03 implementation:

ITK_NOEXCEPT follows CMake’s compiler detection module, while ITK_NOEXCEPT_OR_THROW was defined for ITK’s compatibility needs.

2 Likes