From 23bfcfc15ffca75a0a90440c50781d384ce3fe0c Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 17 Jan 2017 10:30:21 +0100 Subject: [PATCH] Add missing overload of get_compile_time for c++98/11 --- Eigen/src/Core/util/IntegralConstant.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Eigen/src/Core/util/IntegralConstant.h b/Eigen/src/Core/util/IntegralConstant.h index 7f99863a1..003856b20 100644 --- a/Eigen/src/Core/util/IntegralConstant.h +++ b/Eigen/src/Core/util/IntegralConstant.h @@ -47,20 +47,24 @@ protected: }; template struct get_compile_time { - enum { value = Default }; + static const int value = Default; }; template struct get_compile_time,Default> { - enum { value = N }; + static const int value = N; +}; + +template struct get_compile_time (*)(),Default> { + static const int value = N; }; template struct get_compile_time,Default> { - enum { value = N }; + static const int value = N ; }; template struct get_compile_time,Default> { - enum { value = N }; + static const int value = N; };