00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef MTL_TRAITS_ADD_CONST_INCLUDE
00013 #define MTL_TRAITS_ADD_CONST_INCLUDE
00014
00015 namespace mtl { namespace traits {
00016
00018
00022 template <typename T>
00023 struct add_const_to_data
00024 {
00025 typedef T const type;
00026 };
00027
00028 template <typename T*>
00029 struct add_const_to_data
00030 {
00031 typedef T const * type;
00032 };
00033
00035
00039 template <typename T>
00040 struct add_const_to_root
00041 {
00042 typedef T const type;
00043 };
00044
00045 template <typename T*>
00046 struct add_const_to_root
00047 {
00048 typedef typename add_const_to_root<T>::type * type;
00049 };
00050
00052
00055 template <typename T>
00056 struct add_const_to_all
00057 {
00058 typedef T const type;
00059 };
00060
00061 template <typename T*>
00062 struct add_const_to_all
00063 {
00064 typedef typename add_const_to_all<T>::type * const type;
00065 };
00066
00067 }}
00068
00069 #endif // MTL_TRAITS_ADD_CONST_INCLUDE
00070
00071