From ee980ee32fb84f90cf5ea16369e7ae009ed2dee7 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Sat, 19 Sep 2020 17:34:35 +0300 Subject: [PATCH] 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. --- hashers.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hashers.cc b/hashers.cc index cf9f2f727d..015a9122e0 100644 --- a/hashers.cc +++ b/hashers.cc @@ -38,8 +38,8 @@ concept HashUpdater = }; template -requires HashUpdater struct cryptopp_hasher::impl { + static_assert(HashUpdater); using impl_type = typename hasher_traits::impl_type; impl_type hash{};