Changeset 138:b4ec8fe1d2ef in finroc_plugins_data_ports


Ignore:
Timestamp:
28.01.2019 15:41:56 (5 months ago)
Author:
Max Reichardt <max.reichardt@…>
Branch:
17.03
Phase:
public
Message:

Makes IsCheaplyCopiedType type trait use type traits from rrlib_rtti

File:
1 edited

Legend:

Unmodified
Added
Removed
  • type_traits.h

    r123 r138  
    7979struct tIsCheaplyCopiedType 
    8080{ 
    81   enum { value = std::is_trivially_destructible<T>::value && (sizeof(T) <= cMAX_SIZE_CHEAPLY_COPIED_TYPES) }; 
     81  enum { value = rrlib::rtti::SupportsBitwiseCopy<T>::value && (sizeof(T) <= cMAX_SIZE_CHEAPLY_COPIED_TYPES) }; 
    8282}; 
    8383 
     
    8787inline bool IsCheaplyCopiedType(const rrlib::rtti::tType& dt) 
    8888{ 
    89   return dt.GetSize() <= cMAX_SIZE_CHEAPLY_COPIED_TYPES && ((dt.GetTypeTraits() & rrlib::rtti::trait_flags::cHAS_TRIVIAL_DESTRUCTOR) != 0); 
     89  return dt.GetSize() <= cMAX_SIZE_CHEAPLY_COPIED_TYPES && ((dt.GetTypeTraits() & rrlib::rtti::trait_flags::cSUPPORTS_BITWISE_COPY) != 0); 
    9090} 
    9191 
Note: See TracChangeset for help on using the changeset viewer.