Category "reinterpret-cast"

Avoid copying with reinterpret_cast the buffer?

I came across a code snippet where the bytes from a buffer were copied into a struct variable using memcpy(): MtaHeader m_hdr; memcpy(&m_hdr,&p_data[pos

constexpr iterate over section in memory

I am trying to turn a function, createArray, into a constexpr function. This function creates an array from a contiguous section in memory marked by two arbitra