Go to the documentation of this file.00001
00010 #ifndef HELP_GET_HH
00011 #define HELP_GET_HH
00012
00013 #include"../type_list/type_list.hh"
00014 #include"../type_list/get_list.hh"
00015
00016 namespace my_lib{
00018 namespace internal{
00019
00025 template<typename TList, unsigned N>
00026 struct HelpGet {
00027 typedef typename type_list::GetType<TList,N>::type val_type;
00028 typedef typename TList::tail tail;
00029
00038 static val_type& get(Nuple<tail>& uple) {
00039 return HelpGet<tail,N-1>::get(uple) ;
00040 }
00041
00042 };
00043
00045 template<typename TList>
00046 struct HelpGet<TList, 0> {
00047 typedef typename TList::head val_type;
00049 static val_type& get(Nuple<TList>& uple){
00050 return uple.val;
00051 }
00052
00053 };
00054
00055 }
00056 }
00057
00058 #endif //HELP_GET_HH