1 #ifndef GENESIS_UTILS_CORE_STD_H_
2 #define GENESIS_UTILS_CORE_STD_H_
48 # define GENESIS_FUNC __PRETTY_FUNCTION__
50 # if defined __STDC_VERSION__
51 # define GENESIS_FUNC __func__
53 # define GENESIS_FUNC __FUNCTION__
66 #define GENESIS_LIKELY
67 #define GENESIS_UNLIKELY
81 template<
typename T,
typename... Args>
84 return std::unique_ptr<T>(
new T(std::forward<Args>(args)...));
116 return h1 ^ ( h2 + 0x9e3779b9 + ( h1 << 6 ) + ( h1 >> 2 ));
121 return h1 ^ ( h2 + 0x9e3779b97f4a7c16 + ( h1 << 12 ) + ( h1 >> 4 ));
138 (
sizeof( std::size_t ) == 4 ) || (
sizeof( std::size_t ) == 8 ),
139 "Need sizeof( std::size_t ) to be 4 or 8 (32bit or 64bit integer)"
141 return (
sizeof( std::size_t ) == 4 )
159 template <
typename T>
160 inline constexpr std::size_t
hash_combine( std::size_t seed, T
const& value )
168 #endif // include guard