]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common/bit_vector: fix iterator vs reference constness confusion
authorIlya Dryomov <idryomov@gmail.com>
Fri, 5 Jan 2024 11:23:24 +0000 (12:23 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 2 Feb 2024 14:36:57 +0000 (15:36 +0100)
commit9e7ec4584454632a8bb72146a31ae29a05bef29e
tree64522284f81c8acbeab9207621d11ae6a7e1b602
parente1828bf00a0ecc772f5bd2fce37ea5e0edd9294d
common/bit_vector: fix iterator vs reference constness confusion

T (ConstIterator or Iterator) is confused with const T here:
IteratorImpl dereference operator is wrongly overloaded on const
and returns Reference instead of ConstReference for ConstIterator.
This then fails inside bufferlist bowels because Reference is
incompatible with bufferlist::const_iterator.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 45d534553abaca81e26574fd5a7b17b9219c0dd0)
src/common/bit_vector.hpp