Changeset 146:e6bb8d5c9482 in rrlib_rtti


Ignore:
Timestamp:
29.06.2020 18:23:57 (10 days ago)
Author:
Max Reichardt <max.reichardt@…>
Branch:
17.03
Phase:
public
Tags:
tip
Message:

Makes it possible to specify non-normalized types in UnderlyingType type trait

File:
1 edited

Legend:

Unmodified
Added
Removed
  • detail/tDataTypeInfo.h

    r143 r146  
    108108  static tTypeInfo::tSharedInfo shared_info; 
    109109  typedef typename NormalizedType<typename ElementType<typename std::conditional<serialization::IsAssociativeContainer<T>::value, void, T>::type>::type>::type tElement; 
    110   typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename UnderlyingType<T>::type>::type tUnderlying; 
     110  typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename NormalizedType<typename UnderlyingType<T>::type>::type>::type tUnderlying; 
    111111  struct tTable 
    112112  { 
     
    123123  static tTypeInfo::tSharedInfo shared_info; 
    124124  typedef typename NormalizedType<typename ElementType<typename std::conditional<serialization::IsAssociativeContainer<T>::value, void, T>::type>::type>::type tElement; 
    125   typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename UnderlyingType<T>::type>::type tUnderlying; 
     125  typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename NormalizedType<typename UnderlyingType<T>::type>::type>::type tUnderlying; 
    126126  struct tTable 
    127127  { 
     
    140140  static tTypeInfo::tSharedInfo shared_info; 
    141141  typedef typename NormalizedType<typename ElementType<typename std::conditional<serialization::IsAssociativeContainer<T>::value, void, T>::type>::type>::type tElement; 
    142   typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename UnderlyingType<T>::type>::type tUnderlying; 
     142  typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename NormalizedType<typename UnderlyingType<T>::type>::type>::type tUnderlying; 
    143143  struct tTable 
    144144  { 
     
    157157  static tTypeInfo::tSharedInfo shared_info; 
    158158  typedef typename NormalizedType<typename ElementType<typename std::conditional<serialization::IsAssociativeContainer<T>::value, void, T>::type>::type>::type tElement; 
    159   typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename UnderlyingType<T>::type>::type tUnderlying; 
     159  typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename NormalizedType<typename UnderlyingType<T>::type>::type>::type tUnderlying; 
    160160  struct tTable 
    161161  { 
     
    176176  static tTypeInfo::tSharedInfo shared_info; 
    177177  typedef typename NormalizedType<typename ElementType<typename std::conditional<serialization::IsAssociativeContainer<T>::value, void, T>::type>::type>::type tElement; 
    178   typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename UnderlyingType<T>::type>::type tUnderlying; 
     178  typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename NormalizedType<typename UnderlyingType<T>::type>::type>::type tUnderlying; 
    179179  struct tTable 
    180180  { 
     
    193193  static tTypeInfo::tSharedInfo shared_info; 
    194194  typedef typename NormalizedType<typename ElementType<typename std::conditional<serialization::IsAssociativeContainer<T>::value, void, T>::type>::type>::type tElement; 
    195   typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename UnderlyingType<T>::type>::type tUnderlying; 
     195  typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename NormalizedType<typename UnderlyingType<T>::type>::type>::type tUnderlying; 
    196196  struct tTable 
    197197  { 
     
    211211{ 
    212212  static tTypeInfo::tSharedInfo shared_info; 
    213   typedef typename NormalizedType<typename ElementType<typename std::conditional<serialization::IsAssociativeContainer<T>::value, void, T>::type>::type>::type tElement; 
    214   typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename UnderlyingType<T>::type>::type tUnderlying; 
     213  static_assert(!std::is_same<T, unsigned long>::value, "How can this happen"); 
     214  typedef typename NormalizedType<typename ElementType<typename std::conditional<serialization::IsAssociativeContainer<T>::value, void, T>::type>::type>::type tElement; 
     215  typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename NormalizedType<typename UnderlyingType<T>::type>::type>::type tUnderlying; 
    215216  struct tTable 
    216217  { 
     
    231232  static tTypeInfo::tSharedInfo shared_info; 
    232233  typedef typename NormalizedType<typename ElementType<typename std::conditional<serialization::IsAssociativeContainer<T>::value, void, T>::type>::type>::type tElement; 
    233   typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename UnderlyingType<T>::type>::type tUnderlying; 
     234  typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename NormalizedType<typename UnderlyingType<T>::type>::type>::type tUnderlying; 
    234235  struct tTable 
    235236  { 
     
    252253  static tTypeInfo::tSharedInfo shared_info; 
    253254  typedef typename NormalizedType<typename ElementType<T>::type>::type tElement; 
    254   typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename UnderlyingType<T>::type>::type tUnderlying; 
     255  typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename NormalizedType<typename UnderlyingType<T>::type>::type>::type tUnderlying; 
    255256  struct tTable 
    256257  { 
     
    271272  static tTypeInfo::tSharedInfo shared_info; 
    272273  typedef typename NormalizedType<typename ElementType<T>::type>::type tElement; 
    273   typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename UnderlyingType<T>::type>::type tUnderlying; 
     274  typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename NormalizedType<typename UnderlyingType<T>::type>::type>::type tUnderlying; 
    274275  struct tTable 
    275276  { 
     
    292293  static tTypeInfo::tSharedInfo shared_info; 
    293294  typedef typename NormalizedType<typename ElementType<T>::type>::type tElement; 
    294   typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename UnderlyingType<T>::type>::type tUnderlying; 
     295  typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename NormalizedType<typename UnderlyingType<T>::type>::type>::type tUnderlying; 
    295296  struct tTable 
    296297  { 
     
    313314  static tTypeInfo::tSharedInfo shared_info; 
    314315  typedef typename NormalizedType<typename ElementType<T>::type>::type tElement; 
    315   typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename UnderlyingType<T>::type>::type tUnderlying; 
     316  typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename NormalizedType<typename UnderlyingType<T>::type>::type>::type tUnderlying; 
    316317  struct tTable 
    317318  { 
     
    338339  typedef std::vector<T> V; 
    339340  typedef typename NormalizedType<typename ElementType<T>::type>::type tElement; 
    340   typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename UnderlyingType<T>::type>::type tUnderlying; 
     341  typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename NormalizedType<typename UnderlyingType<T>::type>::type>::type tUnderlying; 
    341342  struct tTable 
    342343  { 
     
    358359{ 
    359360  static tTypeInfo::tSharedInfoTuple shared_info; 
    360   typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename UnderlyingType<T>::type>::type tUnderlying; 
     361  typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename NormalizedType<typename UnderlyingType<T>::type>::type>::type tUnderlying; 
    361362  struct tTable 
    362363  { 
     
    372373{ 
    373374  static tTypeInfo::tSharedInfoTuple shared_info; 
    374   typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename UnderlyingType<T>::type>::type tUnderlying; 
     375  typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename NormalizedType<typename UnderlyingType<T>::type>::type>::type tUnderlying; 
    375376  struct tTable 
    376377  { 
     
    388389{ 
    389390  static tTypeInfo::tSharedInfoTuple shared_info; 
    390   typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename UnderlyingType<T>::type>::type tUnderlying; 
     391  typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename NormalizedType<typename UnderlyingType<T>::type>::type>::type tUnderlying; 
    391392  struct tTable 
    392393  { 
     
    404405{ 
    405406  static tTypeInfo::tSharedInfoTuple shared_info; 
    406   typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename UnderlyingType<T>::type>::type tUnderlying; 
     407  typedef typename std::conditional<std::is_same<typename UnderlyingType<T>::type, T>::value, void, typename NormalizedType<typename UnderlyingType<T>::type>::type>::type tUnderlying; 
    407408  struct tTable 
    408409  { 
Note: See TracChangeset for help on using the changeset viewer.