silenced bogus CGG warning

This commit is contained in:
joaquintides
2022-11-07 13:47:43 +01:00
parent c30e93544d
commit 5a4071d4f0

View File

@ -1533,8 +1533,13 @@ private:
void copy_elements_array_from(const table& x,std::true_type /* -> memcpy */)
{
/* reinterpret_cast: GCC may complain about value_type not being trivially
* copy-assignable when we're relying on trivial copy constructibility.
*/
std::memcpy(
arrays.elements,x.arrays.elements,x.capacity()*sizeof(value_type));
reinterpret_cast<unsigned char*>(arrays.elements),
reinterpret_cast<unsigned char*>(x.arrays.elements),
x.capacity()*sizeof(value_type));
}
void copy_elements_array_from(const table& x,std::false_type /* -> manual */)