]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/common: all_same_way() static_asserts on handler's invokeability. 36071/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 13 Jul 2020 13:57:56 +0000 (15:57 +0200)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 13 Jul 2020 14:07:58 +0000 (16:07 +0200)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/common/errorator.h

index 303b748a00605885d98a0270e112537c5324748b..95454ca424cfa6bf4de1b97b53a86ab70a89e47c 100644 (file)
@@ -698,6 +698,7 @@ private:
       using decayed_t = std::decay_t<decltype(e)>;
       auto&& handler =
         decayed_t::error_t::handle(std::forward<ErrorFunc>(func));
+      static_assert(std::is_invocable_v<decltype(handler), ErrorT>);
       return std::invoke(std::move(handler), std::forward<ErrorT>(e));
     }
   };