From: Changcheng Liu Date: Sun, 10 May 2020 08:45:19 +0000 (+0800) Subject: test/bufferlist: test move assignment operator not move constructor X-Git-Tag: wip-pdonnell-testing-20200918.022351~1282^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e2016cdd497674158107189491ee3ee32034dae7;p=ceph-ci.git test/bufferlist: test move assignment operator not move constructor "bufferlist move = std::move(bl)" exercises the "move constructor". But the purpose of this test is to verify the functionality of "move assignment operator". So this PR construct "move" first, and then assign rvalue reference to it. Signed-off-by: Changcheng Liu --- diff --git a/src/test/bufferlist.cc b/src/test/bufferlist.cc index 9a70e098ba6..f73eec47728 100644 --- a/src/test/bufferlist.cc +++ b/src/test/bufferlist.cc @@ -1412,7 +1412,8 @@ TEST(BufferList, operator_equal) { // // list& operator= (list&& other) // - bufferlist move = std::move(bl); + bufferlist move; + move = std::move(bl); { std::string dest; move.begin(1).copy(1, dest);