//========================================================================================
template <int size,typename T1,typename T2
void static_copy_bytes(T1 *to,const T2 *fm)
{
	struct char_array
	{
		char data[size];
	};
  	*(reinterpret_cast<      char_array *(to)) = 
	*(reinterpret_cast<const char_array *(fm));
}
  template <int count,typename T
void static_copy_entries(T *to,const T *fm)
{
	struct entry_array
	{
		T data[count];
	};
  	*(reinterpret_cast<      entry_array *(to)) = 
	*(reinterpret_cast<const entry_array *(fm));
}
  void static_memcpy_test()
{
	int fm[32] = { 4, 7 , 0 };
	int to[32];
	int to2[32];
  	static_copy_bytes<32*4(to,fm);
  	static_copy_entries<32(to2,fm);
  	printf("%d %d\n",to[0],to[1]);
}
  //========================================================================================  |