]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Objecter: remove duplicated with_osdmap() template function
authorKefu Chai <kchai@redhat.com>
Sat, 8 Apr 2017 18:42:22 +0000 (02:42 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 10 Apr 2017 15:20:16 +0000 (23:20 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/osdc/Objecter.h

index 3d2c6b1dab18880f614b216a83699d33b9f968e1..9f73ca6a9826941be1c3daa2d2b57a2b1d9dd8cf 100644 (file)
@@ -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<typename Callback, typename...Args>
-  auto with_osdmap(Callback&& cb, Args&&...args) ->
-    typename std::enable_if<
-      std::is_void<
-    decltype(cb(const_cast<const OSDMap&>(*osdmap),
-               std::forward<Args>(args)...))>::value,
-      void>::type {
-    shared_lock l(rwlock);
-    std::forward<Callback>(cb)(const_cast<const OSDMap&>(*osdmap),
-                              std::forward<Args>(args)...);
-  }
-
   template<typename Callback, typename...Args>
   auto with_osdmap(Callback&& cb, Args&&... args) ->
-    typename std::enable_if<
-      !std::is_void<
-       decltype(cb(const_cast<const OSDMap&>(*osdmap),
-                   std::forward<Args>(args)...))>::value,
-      decltype(cb(const_cast<const OSDMap&>(*osdmap),
-                 std::forward<Args>(args)...))>::type {
+    decltype(cb(const_cast<const OSDMap&>(*osdmap),
+               std::forward<Args>(args)...)) {
     shared_lock l(rwlock);
     return std::forward<Callback>(cb)(const_cast<const OSDMap&>(*osdmap),
                                      std::forward<Args>(args)...);