We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple functions in autodiff/forward/real/real.hpp are marked constexpr which does not align with the standard, e.g. exp, pow, ...
autodiff/forward/real/real.hpp
constexpr
exp
pow
This is a non-standard gcc extension, see here.
Thus, the following example code compiles with gcc but not with clang nor msvc
#include <cmath> int main(){ constexpr auto x = std::exp(1); }
You can try it live on godbolt here.
This problem will also occur when we try to apply those functions to real:
real
#include <autodiff/forward/real.hpp> using namespace autodiff; int main() { constexpr auto x = exp(real(1)); }
There are some drop-in replacements which support constexpr basic math functions. Maybe we should rely on one of those.
PS: I currently work on rewriting real.hpp abit and would remove the constexpr tag on those functions.
real.hpp
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Multiple functions in
autodiff/forward/real/real.hpp
are markedconstexpr
which does not align with the standard, e.g.exp
,pow
, ...This is a non-standard gcc extension, see here.
Thus, the following example code compiles with gcc but not with clang nor msvc
You can try it live on godbolt here.
This problem will also occur when we try to apply those functions to
real
:There are some drop-in replacements which support
constexpr
basic math functions. Maybe we should rely on one of those.PS: I currently work on rewriting
real.hpp
abit and would remove theconstexpr
tag on those functions.The text was updated successfully, but these errors were encountered: