]>
git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
buffer: constrain conversions of buffers_t iterators
prevent conversions from const_iterator -> iterator to resolve a c++20
compilation error with clang 13:
ceph/src/include/buffer.h:537:18: error: use of overloaded operator '==' is ambiguous (with operand types 'ceph::buffer::list::buffers_t::const_iterator' (aka 'buffers_iterator<const ceph::buffer::ptr_node>') and 'ceph::buffer::list::buffers_t::iterator' (aka 'buffers_iterator<ceph::buffer::ptr_node>'
))
_root.next = it == end() ? &item : _root.next;
~~ ^ ~~~~~
ceph/src/include/buffer.h:471:7: note: candidate function
bool operator==(const buffers_iterator& rhs) const {
^
ceph/src/include/buffer.h:471:7: note: candidate function (with reversed parameter order)
Signed-off-by: Casey Bodley <cbodley@redhat.com>