]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/shared_cache: remove less and hash template parameters
authorKefu Chai <kchai@redhat.com>
Tue, 26 Jun 2018 10:47:18 +0000 (18:47 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 27 Jun 2018 13:40:47 +0000 (21:40 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/shared_cache.hpp

index 59179bfbad14fdc47f1146145d94582c3eb748e2..266a3b9def3810d66f68f5727d333df1cede558b 100644 (file)
@@ -24,7 +24,7 @@
 // re-include our assert to clobber the system one; fix dout:
 #include "include/assert.h"
 
-template <class K, class V, class C = std::less<K>, class H = std::hash<K> >
+template <class K, class V>
 class SharedLRU {
   CephContext *cct;
   typedef std::shared_ptr<V> VPtr;
@@ -36,6 +36,8 @@ class SharedLRU {
 public:
   int waiting;
 private:
+  using C = std::less<K>;
+  using H = std::hash<K>;
   ceph::unordered_map<K, typename list<pair<K, VPtr> >::iterator, H> contents;
   list<pair<K, VPtr> > lru;