From e55182ac09885d7558adf75e9e230b051a721c18 Mon Sep 17 00:00:00 2001 From: Rasmus Munk Larsen Date: Fri, 18 Sep 2020 17:38:58 +0000 Subject: 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. --- Eigen/src/Core/util/Macros.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Eigen/src/Core/util/Macros.h') 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 -- cgit v1.2.3