The C++23 std::move_only_function is a move-only version of std::function.
Apart from allowing for non-copyable function objects, the std::move_only_function fully supports invocable semantics and respects const.
Click to open in Compiler Explorer.
Leave a comment
Is the reason of not constructable that u use unique ptr in capture???