|
@@ -522,7 +522,7 @@ template <class ValueType> inline Iterator<ValueType> memcopy(Iterator<ValueType
|
|
|
SCTL_UNUSED(source[num - 1] );
|
|
|
#endif
|
|
|
if (std::is_trivially_copyable<ValueType>::value) {
|
|
|
- memcpy(&destination[0], &source[0], num * sizeof(ValueType));
|
|
|
+ memcpy((void*)&destination[0], (const void*)&source[0], num * sizeof(ValueType));
|
|
|
} else {
|
|
|
for (Long i = 0; i < num; i++) destination[i] = source[i];
|
|
|
}
|
|
@@ -536,7 +536,8 @@ template <class ValueType> inline Iterator<ValueType> memset(Iterator<ValueType>
|
|
|
SCTL_UNUSED(ptr[0] );
|
|
|
SCTL_UNUSED(ptr[num - 1]);
|
|
|
#endif
|
|
|
- ::memset(&ptr[0], value, num * sizeof(ValueType));
|
|
|
+ SCTL_ASSERT(std::is_trivially_copyable<ValueType>::value);
|
|
|
+ ::memset((void*)&ptr[0], value, num * sizeof(ValueType));
|
|
|
}
|
|
|
return ptr;
|
|
|
}
|