]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc: using decltype(auto) instead of trailing return type declaration 29931/head
authorYao Zongyou <yaozongyou@vip.qq.com>
Tue, 27 Aug 2019 12:53:19 +0000 (20:53 +0800)
committerYao Zongyou <yaozongyou@vip.qq.com>
Tue, 27 Aug 2019 12:53:19 +0000 (20:53 +0800)
Signed-off-by: Yao Zongyou <yaozongyou@vip.qq.com>
src/osdc/Objecter.h

index 96c2ab0a2323c25388037be620436ac23970b4a4..3a21cffbc6f8bd51929dfc9a95e9d7b313646102 100644 (file)
@@ -2123,8 +2123,7 @@ private:
   // here or you will have great woe and misery.
 
   template<typename Callback, typename...Args>
-  auto with_osdmap(Callback&& cb, Args&&... args) const ->
-    decltype(cb(*osdmap, std::forward<Args>(args)...)) {
+  decltype(auto) with_osdmap(Callback&& cb, Args&&... args) {
     shared_lock l(rwlock);
     return std::forward<Callback>(cb)(*osdmap, std::forward<Args>(args)...);
   }