From: Radoslaw Zarzynski Date: Mon, 13 Jul 2020 13:57:56 +0000 (+0200) Subject: crimson/common: all_same_way() static_asserts on handler's invokeability. X-Git-Tag: v16.1.0~1629^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1f6adf6aa9d7c2dfc7853395478ff9726f5dbcec;p=ceph.git crimson/common: all_same_way() static_asserts on handler's invokeability. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/crimson/common/errorator.h b/src/crimson/common/errorator.h index 303b748a0060..95454ca424cf 100644 --- a/src/crimson/common/errorator.h +++ b/src/crimson/common/errorator.h @@ -698,6 +698,7 @@ private: using decayed_t = std::decay_t; auto&& handler = decayed_t::error_t::handle(std::forward(func)); + static_assert(std::is_invocable_v); return std::invoke(std::move(handler), std::forward(e)); } };