From f45325672fc91a2cb61dbacbc8e417d0968a46c8 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 9 Apr 2017 02:42:22 +0800 Subject: [PATCH] osdc/Objecter: remove duplicated with_osdmap() template function Signed-off-by: Kefu Chai --- src/osdc/Objecter.h | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h index 3d2c6b1dab1..9f73ca6a982 100644 --- a/src/osdc/Objecter.h +++ b/src/osdc/Objecter.h @@ -1951,26 +1951,10 @@ private: // Do not call into something that will try to lock the OSDMap from // here or you will have great woe and misery. - template - auto with_osdmap(Callback&& cb, Args&&...args) -> - typename std::enable_if< - std::is_void< - decltype(cb(const_cast(*osdmap), - std::forward(args)...))>::value, - void>::type { - shared_lock l(rwlock); - std::forward(cb)(const_cast(*osdmap), - std::forward(args)...); - } - template auto with_osdmap(Callback&& cb, Args&&... args) -> - typename std::enable_if< - !std::is_void< - decltype(cb(const_cast(*osdmap), - std::forward(args)...))>::value, - decltype(cb(const_cast(*osdmap), - std::forward(args)...))>::type { + decltype(cb(const_cast(*osdmap), + std::forward(args)...)) { shared_lock l(rwlock); return std::forward(cb)(const_cast(*osdmap), std::forward(args)...); -- 2.47.3