ClickHouse/dbms/include/DB/Common/unaligned.h

14 lines
197 B
C++
Raw Normal View History

#pragma once
#include <DB/Core/Defines.h>
#include <string.h>
template <typename T>
inline T unalignedLoad(const void * address)
{
T res {};
memcpy(&res, address, sizeof(res));
return res;
}