This bugzilla service is closed. All entries have been migrated to

Bug 1109

Summary: Dynamic exception specifications are deprecated
Product: Eigen Reporter: Gonzalo BG <gonzalobg88>
Component: Core - generalAssignee: Nobody <eigen.nobody>
Severity: Unknown CC: chtz, gael.guennebaud, jacob.benoit.1
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 558    

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: