From a9e4224bc4ff2ea5971d84d236b90cc0073c640d Mon Sep 17 00:00:00 2001 From: boeschf <48126478+boeschf@users.noreply.github.com> Date: Tue, 24 May 2022 13:09:20 +0200 Subject: [PATCH] remove checks for move ctor when it could be elided (#1899) Remove checks for move ctor when it could be elided --- test/unit/test_thread.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/unit/test_thread.cpp b/test/unit/test_thread.cpp index 49d46d05..3ef13c72 100644 --- a/test/unit/test_thread.cpp +++ b/test/unit/test_thread.cpp @@ -72,7 +72,8 @@ TEST(task_system, test_copy) { ts.async(f, 0); // Copy into new ftor and move ftor into a task (std::function<void()>) - EXPECT_EQ(1, nmove); + // move ctor is elided with some compilers + //EXPECT_EQ(1, nmove); EXPECT_EQ(1, ncopy); reset(); } @@ -99,7 +100,8 @@ TEST(notification_queue, test_copy) { q.push({task(f), 0}); // Copy into new ftor and move ftor into a task (std::function<void()>) - EXPECT_EQ(1, nmove); + // move ctor is elided with some compilers + //EXPECT_EQ(1, nmove); EXPECT_EQ(1, ncopy); reset(); } -- GitLab