diff --git a/include/flatbuffers/hash.h b/include/flatbuffers/hash.h index a97b23152..16536cb49 100644 --- a/include/flatbuffers/hash.h +++ b/include/flatbuffers/hash.h @@ -39,7 +39,7 @@ template<> struct FnvTraits { static const uint64_t kOffsetBasis = 0xcbf29ce484222645ULL; }; -template FLATBUFFERS_CONSTEXPR_CPP14 T HashFnv1(const char *input) { +template T HashFnv1(const char *input) { T hash = FnvTraits::kOffsetBasis; for (const char *c = input; *c; ++c) { hash *= FnvTraits::kFnvPrime; @@ -48,7 +48,7 @@ template FLATBUFFERS_CONSTEXPR_CPP14 T HashFnv1(const char *input) { return hash; } -template FLATBUFFERS_CONSTEXPR_CPP14 T HashFnv1a(const char *input) { +template T HashFnv1a(const char *input) { T hash = FnvTraits::kOffsetBasis; for (const char *c = input; *c; ++c) { hash ^= static_cast(*c); @@ -57,12 +57,12 @@ template FLATBUFFERS_CONSTEXPR_CPP14 T HashFnv1a(const char *input) return hash; } -template <> FLATBUFFERS_CONSTEXPR_CPP14 inline uint16_t HashFnv1(const char *input) { +template <> inline uint16_t HashFnv1(const char *input) { uint32_t hash = HashFnv1(input); return (hash >> 16) ^ (hash & 0xffff); } -template <> FLATBUFFERS_CONSTEXPR_CPP14 inline uint16_t HashFnv1a(const char *input) { +template <> inline uint16_t HashFnv1a(const char *input) { uint32_t hash = HashFnv1a(input); return (hash >> 16) ^ (hash & 0xffff); }