New user self-registration is disabled due to spam. Please email eigen-core-team @ if you need an account.
Before reporting a bug, please make sure that your Eigen version is up-to-date!
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: 2015-12-10 14:49 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.

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