Changeset 103:4c886d857d1f in rrlib_util


Ignore:
Timestamp:
06.01.2014 12:09:47 (6 years ago)
Author:
Tobias Föhst <foehst@…>
Branch:
13.10
Children:
104:6763edb5aa9f, 112:3bac4000907e
Phase:
public
Message:
  • Adjusted type_list/tTypeListBase.h according to code convention
  • Moved constant definition out of class declaration
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • test/test_type_list.cpp

    r98 r103  
    149149void PrintList() 
    150150{ 
    151   std::cout << "size: " << type_list::tSizeOf<TList>::cVALUE << " \telements: <"; 
     151  std::cout << "size: " << TList::cSIZE << " \telements: <"; 
    152152  PrintListElements<TList>(); 
    153153  std::cout << ">" << std::endl; 
  • type_list/tTypeListBase.h

    r98 r103  
    7272 * 
    7373 */ 
    74 template <typename tList> 
     74template <typename TList> 
    7575struct tTypeListBase 
    7676{ 
    77   static const size_t cSIZE = type_list::tSizeOf<tList>::cVALUE; 
     77  static const size_t cSIZE; 
    7878 
    7979  template <size_t Tindex> 
    8080  struct tAt 
    8181  { 
    82     typedef typename type_list::tAt<tList, Tindex>::tResult tResult; 
     82    typedef typename type_list::tAt<TList, Tindex>::tResult tResult; 
    8383  }; 
    8484 
     
    8686  struct tIndexOf 
    8787  { 
    88     static const size_t cVALUE = type_list::tFind<tList, T>::cINDEX; 
     88    static const size_t cVALUE = type_list::tFind<TList, T>::cINDEX; 
    8989  }; 
    9090 
     
    9292  struct tAppend 
    9393  { 
    94     typedef typename type_list::tAppend<tList, T>::tResult tResult; 
     94    typedef typename type_list::tAppend<TList, T>::tResult tResult; 
    9595  }; 
    9696 
    97   template <typename TList> 
     97  template <typename TOtherList> 
    9898  struct tAppendList 
    9999  { 
    100     typedef typename type_list::tAppendList<tList, TList>::tResult tResult; 
     100    typedef typename type_list::tAppendList<TList, TOtherList>::tResult tResult; 
    101101  }; 
    102102 
     
    104104  struct tRemove 
    105105  { 
    106     typedef typename type_list::tRemove<tList, T>::tResult tResult; 
     106    typedef typename type_list::tRemove<TList, T>::tResult tResult; 
    107107  }; 
    108108 
     
    110110  struct tRemoveAll 
    111111  { 
    112     typedef typename type_list::tRemoveAll<tList, T>::tResult tResult; 
     112    typedef typename type_list::tRemoveAll<TList, T>::tResult tResult; 
    113113  }; 
    114114 
    115115  struct tUnique 
    116116  { 
    117     typedef typename type_list::tUnique<tList>::tResult tResult; 
     117    typedef typename type_list::tUnique<TList>::tResult tResult; 
    118118  }; 
    119119 
     
    121121  struct tReplace 
    122122  { 
    123     typedef typename type_list::tReplace<tList, TOld, TNew>::tResult tResult; 
     123    typedef typename type_list::tReplace<TList, TOld, TNew>::tResult tResult; 
    124124  }; 
    125125 
     
    127127  struct tReplaceAll 
    128128  { 
    129     typedef typename type_list::tReplaceAll<tList, TOld, TNew>::tResult tResult; 
     129    typedef typename type_list::tReplaceAll<TList, TOld, TNew>::tResult tResult; 
    130130  }; 
    131131 
     
    133133  struct tMostDerived 
    134134  { 
    135     typedef typename type_list::tMostDerived<tList, TBase>::tResult tResult; 
     135    typedef typename type_list::tMostDerived<TList, TBase>::tResult tResult; 
    136136  }; 
    137137 
    138138  struct tDerivedToFront 
    139139  { 
    140     typedef typename type_list::tDerivedToFront<tList>::tResult tResult; 
     140    typedef typename type_list::tDerivedToFront<TList>::tResult tResult; 
    141141  }; 
    142142}; 
     143 
     144template <typename TList> 
     145const size_t tTypeListBase<TList>::cSIZE = type_list::tSizeOf<TList>::cVALUE; 
    143146 
    144147//---------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.