We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63857df commit e788628Copy full SHA for e788628
include/cppcore/Common/Hash.h
@@ -101,6 +101,7 @@ inline THash<T>::THash(T value, T base) :
101
102
template <class T>
103
inline T THash<T>::toHash(const char *buffer, T base) {
104
+ static_assert(std::is_integral<T>::value, "THash requires T to be an integral type.");
105
T hash = 0;
106
if (nullptr == buffer) {
107
return hash;
@@ -114,7 +115,7 @@ inline T THash<T>::toHash(const char *buffer, T base) {
114
115
116
117
}
-
118
+0
119
120
inline T THash<T>::toHash(T value, T base) {
121
const T hash = value % base;
0 commit comments