aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-12-01 09:22:54 -0500
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-12-01 09:22:54 -0500
commit59b944cb50453d64e7a3243a01301d3207863f6d (patch)
tree60873e1c1742208178e8d3456ce48275f5e26dc9 /Eigen/src/Core
parent46387cc1801701dac3d611e12712429bbae64e88 (diff)
add is_const
Diffstat (limited to 'Eigen/src/Core')
-rw-r--r--Eigen/src/Core/util/Meta.h7
1 files 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<unsigned long> { enum { value = true }; };
template<> struct is_arithmetic<signed long long> { enum { value = true }; };
template<> struct is_arithmetic<unsigned long long> { enum { value = true }; };
-template <class T> struct add_const { typedef const T type; };
-template <class T> struct add_const<T&> { typedef T& type; };
+template <typename T> struct add_const { typedef const T type; };
+template <typename T> struct add_const<T&> { typedef T& type; };
+
+template <typename T> struct is_const { enum { value = 0 }; };
+template <typename T> struct is_const<T const> { enum { value = 1 }; };
template<typename T> struct add_const_on_value_type { typedef const T type; };
template<typename T> struct add_const_on_value_type<T&> { typedef T const& type; };