1 #ifndef __EIENNET_BASE_HPP__ 2 #define __EIENNET_BASE_HPP__ 7 #if defined(_MSC_VER) || defined(WIN32) 8 #pragma warning( disable: 4251 ) 9 #ifdef EIENNET_DLL_EXPORTS 10 #define EIENNET_DLL __declspec(dllexport) 12 #define EIENNET_DLL __declspec(dllimport) 15 #define EIENNET_API __stdcall 25 #define EIENNET_FUNC_DECL(ret) EIENNET_DLL ret EIENNET_API 26 #define EIENNET_FUNC_IMPL(ret) ret EIENNET_API 33 template <
typename _Ty >
39 for (
size_t i = 0; i <
sizeof(_Ty) / 2; ++i )
42 reinterpret_cast<winux::byte*
>(&v)[i] = reinterpret_cast<winux::byte*>(&v)[
sizeof(_Ty) - 1 - i];
43 reinterpret_cast<winux::byte*
>(&v)[
sizeof(_Ty) - 1 - i] = t;
50 template <
typename _Ty >
56 for (
size_t i = 0; i <
sizeof(_Ty) / 2; ++i )
59 reinterpret_cast<winux::byte*
>(&v)[i] = reinterpret_cast<winux::byte*>(&v)[
sizeof(_Ty) - 1 - i];
60 reinterpret_cast<winux::byte*
>(&v)[
sizeof(_Ty) - 1 - i] = t;
68 #endif // __EIENNET_BASE_HPP__