]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/filestore: silence error from libstdc++ in gcc-8
authorKefu Chai <kchai@redhat.com>
Sun, 6 May 2018 06:52:06 +0000 (14:52 +0800)
committerCasey Bodley <cbodley@redhat.com>
Mon, 7 May 2018 19:34:57 +0000 (15:34 -0400)
this change silences following error

stl_tree.h:452:21: error: static assertion failed: comparison object
must be invocable with two arguments of key type
static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{},
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 68caa9da7ec504021b2cbd1e91367c958cb4d742)

src/os/filestore/HashIndex.h

index e992b1aaea5d2eaaf7409b939ae5603a1b719cc3..715be5dc0adb68a9f0893588bf7242895a061815 100644 (file)
@@ -395,7 +395,7 @@ private:
 
   struct CmpPairBitwise {
     bool operator()(const pair<string, ghobject_t>& l,
-                   const pair<string, ghobject_t>& r)
+                   const pair<string, ghobject_t>& r) const
     {
       if (l.first < r.first)
        return true;
@@ -408,7 +408,7 @@ private:
   };
 
   struct CmpHexdigitStringBitwise {
-    bool operator()(const string& l, const string& r) {
+    bool operator()(const string& l, const string& r) const {
       return reverse_hexdigit_bits_string(l) < reverse_hexdigit_bits_string(r);
     }
   };