Skip to content

turn some macros intro constexpr functions

Now that we have C++14, some actual cleanup. This turns some "computational" macros into actual constexpr functions. The added benefit is that there is a bit more checking involved, e.g. you cannot pass floats anymore.

Should the type here be int or rather Eigen::Index? Also, both the old macro and the new code are susceptible to problems stemming from narrowing conversions.

Merge request reports

Loading