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: v13.2.6~94^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=963d4cc67db6bcc9cb0713a722295a0c2429d644;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 (cherry picked from commit 8abfb42856bfdef1318ba4a178555d95aeeaaf8b) --- diff --git a/src/test/librbd/operation/test_mock_TrimRequest.cc b/src/test/librbd/operation/test_mock_TrimRequest.cc index 15e9bdd055e2..39b54f9708bf 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);