enqueue_detach a non-void returning function
Moved the function requirement into a constexpr if statement and std::ignore any return value from a given function. added a super basic test.
Thanks for the PR.
Just curious, but what is the motivating use case for this change?
No problem!
I have an instance where I have a function that takes a fair amount of arguments and returns a value that I don't care about when running asynchronously. Setting up a lambda myself to do this is a bit tedious because then I have to manually handle all of the arguments, so if this library has this change I can just rely on perfect forwarding.
I had a few extra minutes to play around and figured I'd put up the PR for thoughts. No biggie if there are other reasons to restrict this to void returning functions only.
I see, thanks for the break down! I don't think this should be a problem, just want to check for any performance implications but I think it should be ok.
yeah I don't believe this will have any measurable performance impact on existing tests -- I just pushed a code bubble down into the function body but it's still compile time evaluated.
I think I'd be ok merging this. Could you address the formatting issues? The CI uses clang-format 18.1.3
yep I'll take care of that later today
Thanks!