From: Kefu Chai Date: Sun, 6 May 2018 06:52:06 +0000 (+0800) Subject: os/filestore: silence error from libstdc++ in gcc-8 X-Git-Tag: v13.1.1~21^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d736292ca63d5b391dc9fbbebe53a2905fc3a22a;p=ceph.git os/filestore: silence error from libstdc++ in gcc-8 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 (cherry picked from commit 68caa9da7ec504021b2cbd1e91367c958cb4d742) --- diff --git a/src/os/filestore/HashIndex.h b/src/os/filestore/HashIndex.h index e992b1aaea5..715be5dc0ad 100644 --- a/src/os/filestore/HashIndex.h +++ b/src/os/filestore/HashIndex.h @@ -395,7 +395,7 @@ private: struct CmpPairBitwise { bool operator()(const pair& l, - const pair& r) + const pair& 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); } };