hashers: convert illegal contraint to static_assert

The constraint on on cryptopp_hasher<>::impl is illegal, since it's not
on the base template. Convert it to a static_assert.

We could have moved it to the base template, but that would have undone
the work to push all the implementation details in .cc and reduce #include
load.

Found by clang.
This commit is contained in:
Avi Kivity
2020-09-19 17:34:35 +03:00
parent c5312618d0
commit ee980ee32f

View File

@@ -38,8 +38,8 @@ concept HashUpdater =
};
template <typename T, size_t size>
requires HashUpdater<T>
struct cryptopp_hasher<T, size>::impl {
static_assert(HashUpdater<T>);
using impl_type = typename hasher_traits<T>::impl_type;
impl_type hash{};