You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do I also need to to the same trick when I use std::min and std::max?
Yes, better to enclose functions in parentheses that match standard macros. For "(std::min)(a,b)" it is also better to do this. And for templated and for simple functions.
Thanks. I have done this in c81bcfe. Could you give a quick test? Note that I worked in the 1.y.z branch, which will be the next major release. It breaks a lot of APIs, so you may need to change your code accordingly. Also see the discussion here.
There are problems with old-style min-max C macros, need to supplement all definitions and calls with parentheses to compile. Eigen did this.
// Full specialization template <> struct TypeTraits<float> { static inline float **(**min**)**() { return **(**std::numeric_limits<float>::min**)**(); } };
The text was updated successfully, but these errors were encountered: