This bugzilla service is closed. All entries have been migrated to
Bug 1109 - Dynamic exception specifications are deprecated
Summary: Dynamic exception specifications are deprecated
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: unspecified
Hardware: All All
: Normal Unknown
Assignee: Nobody
Depends on:
Blocks: 3.3
  Show dependency treegraph
Reported: 2015-11-11 16:54 UTC by Gonzalo BG
Modified: 2019-12-04 15:09 UTC (History)
3 users (show)


Description Gonzalo BG 2015-11-11 16:54:12 UTC
When using the macro EIGEN_MAKE_ALIGNED_OPERATOR_NEW clang emits tons of warnings in C++14 mode of the form:

 warning: dynamic exception specifications are deprecated [-Wdeprecated]


 void* operator new(size_t size, const std::nothrow_t&) throw() { \
Since one cannot use compiler pragmas to push/pop these warnings when including Eigen3 headers (one has to do this at every point of use), it would be better if all dynamic exception specifications in Eigen3 would be abstracted behind a macro that can be configured.

For example replacing throw() with EIGEN_NO_THROW that is throw() in C++<11 and noexcept(true) in C++>=11. And if there is throw(some exceptions) that should be abstracted by a macro EIGEN_THROWS(...) that is throw(...) in C++<11 and noexcept(false) in C++>=11. 

Dynamic exception specifications will be removed from the language in C++17, and AFAIK what the compilers will do to retain backwards compatibility is the same thing I stated above (replace trow() with noexcept(true), and throw(...) with noexcept(false)).
Comment 1 Gael Guennebaud 2015-12-10 14:49:47 UTC
Thank you for the detailed report.
Comment 2 Nobody 2019-12-04 15:09:52 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance:

Note You need to log in before you can comment on or make changes to this bug.