add is_const

This commit is contained in:
Benoit Jacob 2010-12-01 09:22:54 -05:00
parent 46387cc180
commit 59b944cb50

View File

@ -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; };