From 59b944cb50453d64e7a3243a01301d3207863f6d Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Wed, 1 Dec 2010 09:22:54 -0500 Subject: [PATCH] add is_const --- Eigen/src/Core/util/Meta.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h index 30ce0564d..4518261ef 100644 --- a/Eigen/src/Core/util/Meta.h +++ b/Eigen/src/Core/util/Meta.h @@ -83,8 +83,11 @@ template<> struct is_arithmetic { enum { value = true }; }; template<> struct is_arithmetic { enum { value = true }; }; template<> struct is_arithmetic { enum { value = true }; }; -template struct add_const { typedef const T type; }; -template struct add_const { typedef T& type; }; +template struct add_const { typedef const T type; }; +template struct add_const { typedef T& type; }; + +template struct is_const { enum { value = 0 }; }; +template struct is_const { enum { value = 1 }; }; template struct add_const_on_value_type { typedef const T type; }; template struct add_const_on_value_type { typedef T const& type; };