forked from boostorg/beast
Fix move-only arguments in bind_handler
This commit is contained in:
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user