ClickHouse/dbms/include/DB/Common/unaligned.h
2016-07-31 08:56:36 +03:00

14 lines
197 B
C++

#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;
}