]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd: s/boost::variant/std::variant/
authorKefu Chai <tchaikov@gmail.com>
Wed, 2 Mar 2022 16:41:19 +0000 (00:41 +0800)
committerKefu Chai <tchaikov@gmail.com>
Fri, 11 Mar 2022 12:46:39 +0000 (20:46 +0800)
commit3a93b40721a1a09ef370fac0886d24ef7cc68e2a
tree90be54fb60faa08c46427deff12594f576069f31
parentb04655645bb3cba7e5c538c1ef349aa81651a56f
librbd: s/boost::variant/std::variant/

boost::variant explicitly prevent it from being compared other types
by marking the return type of, for instance operator==(const T&) as
"void", if T is not identical to the variant type. so address this,
let's use std::variant<> instead.

more standard compliant and simpler this way.

because of https://cplusplus.github.io/LWG/issue3052, libstdc++
only specializes for std::variant<> for std::visit(), while libc++
allows the derived types of std::variant<> to be "visited", hence
we add an adaptor for SnapshotNamespace.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
22 files changed:
src/cls/rbd/cls_rbd.cc
src/cls/rbd/cls_rbd_types.cc
src/cls/rbd/cls_rbd_types.h
src/librbd/ImageCtx.h
src/librbd/ImageWatcher.cc
src/librbd/api/Group.cc
src/librbd/api/Mirror.cc
src/librbd/api/Snapshot.cc
src/librbd/deep_copy/SnapshotCopyRequest.cc
src/librbd/mirror/GetInfoRequest.cc
src/librbd/mirror/snapshot/CreatePrimaryRequest.cc
src/librbd/mirror/snapshot/UnlinkPeerRequest.cc
src/librbd/mirror/snapshot/Utils.cc
src/librbd/operation/SnapshotCreateRequest.cc
src/test/cls_rbd/test_cls_rbd.cc
src/test/librbd/deep_copy/test_mock_SnapshotCopyRequest.cc
src/test/librbd/mirror/snapshot/test_mock_CreatePrimaryRequest.cc
src/test/librbd/mirror/snapshot/test_mock_UnlinkPeerRequest.cc
src/test/rbd_mirror/test_ImageReplayer.cc
src/tools/rbd_mirror/image_replayer/snapshot/ApplyImageStateRequest.cc
src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc
src/tools/rbd_mirror/image_replayer/snapshot/Utils.cc