diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2020-09-18 17:38:58 +0000 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2020-09-18 17:38:58 +0000 |
commit | e55182ac09885d7558adf75e9e230b051a721c18 (patch) | |
tree | 308a5297ef1f1632ebed05c982f98ba6942345b3 /Eigen/src/Core/util/Macros.h | |
parent | 14022f5eb5304e23ebe10284f07bb1387570dc5e (diff) |
Get rid of initialization logic for blueNorm by making the computed constants static const or constexpr.
Move macro definition EIGEN_CONSTEXPR to Core and make all methods in NumTraits constexpr when EIGEN_HASH_CONSTEXPR is 1.
Diffstat (limited to 'Eigen/src/Core/util/Macros.h')
-rw-r--r-- | Eigen/src/Core/util/Macros.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index 3b87cc897..243acc696 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -696,6 +696,12 @@ #endif // EIGEN_HAS_CONSTEXPR +#if EIGEN_HAS_CONSTEXPR +#define EIGEN_CONSTEXPR constexpr +#else +#define EIGEN_CONSTEXPR +#endif + // Does the compiler support C++11 math? // Let's be conservative and enable the default C++11 implementation only if we are sure it exists #ifndef EIGEN_HAS_CXX11_MATH |