From: Willem Jan Withagen Date: Sun, 10 Mar 2019 10:51:09 +0000 (+0100) Subject: librbd: avoid aggregate-initializing any static_visitor X-Git-Tag: v14.1.1~6^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F26876%2Fhead;p=ceph.git librbd: avoid aggregate-initializing any static_visitor This will result in an error complaining about a protected dtor. also see: https://github.com/ceph/ceph/pull/26838 Signed-off-by: Willem Jan Withagen --- diff --git a/src/test/librbd/operation/test_mock_TrimRequest.cc b/src/test/librbd/operation/test_mock_TrimRequest.cc index 15e9bdd055e..39b54f9708b 100644 --- a/src/test/librbd/operation/test_mock_TrimRequest.cc +++ b/src/test/librbd/operation/test_mock_TrimRequest.cc @@ -183,7 +183,7 @@ public: EXPECT_CALL(*mock_image_ctx.io_object_dispatcher, send(_)) .WillOnce(Invoke([&mock_image_ctx, offset, length, update_object_map, r] (io::ObjectDispatchSpec* spec) { - auto discard = boost::apply_visitor(io::DiscardVisitor{}, spec->request); + auto discard = boost::apply_visitor(io::DiscardVisitor(), spec->request); ASSERT_TRUE(discard != nullptr); ASSERT_EQ(offset, discard->object_off); ASSERT_EQ(length, discard->object_len);