Lines Matching refs:T
93 template <class T>
94 void MoveFromBinaryFormat(T& data, const char*& p) { in MoveFromBinaryFormat()
95 static_assert(std::is_standard_layout<T>::value, "not standard layout"); in MoveFromBinaryFormat()
96 memcpy(&data, p, sizeof(T)); in MoveFromBinaryFormat()
97 p += sizeof(T); in MoveFromBinaryFormat()
100 template <class T>
101 void MoveFromBinaryFormat(T& data, char*& p) { in MoveFromBinaryFormat()
102 static_assert(std::is_standard_layout<T>::value, "not standard layout"); in MoveFromBinaryFormat()
103 memcpy(&data, p, sizeof(T)); in MoveFromBinaryFormat()
104 p += sizeof(T); in MoveFromBinaryFormat()
107 template <class T>
108 void MoveFromBinaryFormat(T* data_p, size_t n, const char*& p) { in MoveFromBinaryFormat()
109 static_assert(std::is_standard_layout<T>::value, "not standard layout"); in MoveFromBinaryFormat()
110 size_t size = n * sizeof(T); in MoveFromBinaryFormat()
115 template <class T>
116 void MoveToBinaryFormat(const T& data, char*& p) { in MoveToBinaryFormat()
117 static_assert(std::is_standard_layout<T>::value, "not standard layout"); in MoveToBinaryFormat()
118 memcpy(p, &data, sizeof(T)); in MoveToBinaryFormat()
119 p += sizeof(T); in MoveToBinaryFormat()
122 template <class T>
123 void MoveToBinaryFormat(const T* data_p, size_t n, char*& p) { in MoveToBinaryFormat()
124 static_assert(std::is_standard_layout<T>::value, "not standard layout"); in MoveToBinaryFormat()
125 size_t size = n * sizeof(T); in MoveToBinaryFormat()
172 template <typename T>
173 void HashCombine(size_t& seed, const T& val) { in HashCombine()
174 seed ^= std::hash<T>()(val) + 0x9e3779b9 + (seed << 6) + (seed >> 2); in HashCombine()