Fix move-only arguments in bind_handler

This commit is contained in:
Vinnie Falco
2018-05-27 19:05:43 -07:00
parent 3d7f1e7303
commit f948c9cbe5
3 changed files with 21 additions and 4 deletions
+16
View File
@@ -81,6 +81,21 @@ public:
s.wrap(copyable_handler{}));
}
struct move_only
{
move_only() = default;
move_only(move_only&&) = default;
move_only(move_only const&) = delete;
};
void
testMoveOnly()
{
bind_handler([](move_only){}, move_only{})();
bind_handler([](move_only){}, std::placeholders::_1)(move_only{});
bind_handler([](move_only, move_only){}, move_only{}, std::placeholders::_1)(move_only{});
}
void
run() override
{
@@ -90,6 +105,7 @@ public:
f();
testPlaceholders();
testAsioHandlerInvoke();
testMoveOnly();
}
};