Go to the documentation of this file.
6 #ifndef CMR_LIST_IMPL_INCLUDED
7 #define CMR_LIST_IMPL_INCLUDED
13 #define CMR_LIST_IMPL(T) \
15 template <> void CMREXD CmrListAllocator<T>::constructor(Byte* data, const Byte* value) \
19 new (data) T(*(T*)value); \
24 template <> void CMREXD CmrListAllocator<T>::destructor(Byte* data) \
26 ((T*)data)->T::~T(); \
28 template <> int CMREXD CmrListAllocator<T>::comparator(const Dummy& v1, const Dummy& v2) \
30 const T& ov1 = (const T&)v1; \
31 const T& ov2 = (const T&)v2; \
32 return ov1.compare(ov2); \
37 #define CMR_LIST_IMPL_SCALAR(T) \
39 template <> void CMREXD CmrScalarListAllocator<T>::constructor(Byte* data, const Byte* value) \
43 const T& ov = *(const T*)value; \
49 template <> void CMREXD CmrScalarListAllocator<T>::destructor(Byte* data) \
52 template <> int CMREXD CmrScalarListAllocator<T>::comparator(const Dummy& v1, const Dummy& v2) \
54 const T& ov1 = (const T&)v1; \
55 const T& ov2 = (const T&)v2; \
56 if (ov1 < ov2) return -1; \
57 else if (ov1 == ov2) return 0; \