File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ template <typename I> struct JenHash_t {
4747 constexpr JenHash_t () : value_() {}
4848 constexpr JenHash_t (JenHash_t &&) = default;
4949 constexpr JenHash_t (const JenHash_t &) = default;
50- constexpr explicit JenHash_t (uint32 in) : value_(in) {}
50+ template <class C > requires std::is_integral_v<C>
51+ constexpr JenHash_t (C in) : value_(in) {}
5152 template <size_t n>
5253 constexpr JenHash_t (const char (&input)[n])
5354 : value_(JenkinsHash_<I>({input, n - 1 })) {}
Original file line number Diff line number Diff line change @@ -138,7 +138,9 @@ struct JenHash3 {
138138 constexpr JenHash3 () : value_() {}
139139 constexpr JenHash3 (JenHash3 &&) = default;
140140 constexpr JenHash3 (const JenHash3 &) = default;
141- constexpr explicit JenHash3 (uint32_t in) : value_(in) {}
141+
142+ template <class C > requires std::is_integral_v<C>
143+ constexpr JenHash3 (C in) : value_(in) {}
142144 template <size_t n>
143145 constexpr JenHash3 (const char (&input)[n])
144146 : value_(JenkinsHash3_({input, n - 1 })) {}
@@ -149,6 +151,8 @@ struct JenHash3 {
149151
150152 constexpr operator uint32_t () const { return value_; }
151153
154+ constexpr auto raw () const { return value_; }
155+
152156private:
153157 uint32_t value_;
154158};
You can’t perform that action at this time.
0 commit comments