Update concept Hasher: require T::BLOCK_SIZE_BYTES to be a constant
Chaos Ci / test (push) Successful in 3m13s
Chaos Ci / benchmark (push) Successful in 1m29s

expression.
This commit is contained in:
hashlag committed 2026-09-12 03:11:05 +03:00
1 parent ba87a7d149
commit a070a0c343
1 file changed
+3
+3
View File
@@ -14,7 +14,10 @@ template<typename T>
concept Hasher = requires(T hasher, uint8_t * begin, uint8_t * end) concept Hasher = requires(T hasher, uint8_t * begin, uint8_t * end)
{ {
typename T::HashType; typename T::HashType;
requires std::unsigned_integral<std::remove_cvref_t<decltype(T::BLOCK_SIZE_BYTES)>>; requires std::unsigned_integral<std::remove_cvref_t<decltype(T::BLOCK_SIZE_BYTES)>>;
typename std::integral_constant<decltype(T::BLOCK_SIZE_BYTES), T::BLOCK_SIZE_BYTES>;
hasher.Reset(); hasher.Reset();
hasher.Update(begin, end); hasher.Update(begin, end);
{ hasher.Finish() } -> Hash; { hasher.Finish() } -> Hash;