fix: dpp::cluster::register_command with coroutine handler on windows #1504
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
register_command with dpp::task was not working for me on windows with msvc, this fixes that, and it makes sure to keep register_command working for non coroutines.
I have not tested the changes on anything other than windows, therefore I'm unsure if im sacraficing other platforms.
Also I'm not sure if this is the ideal fix, however it does also let clangd correctly determine the function in use when ctrl+click'ing the register_command, as previously it would just use the non-coro one for all usages of register_command for me. (It is inspired by how dpp::cluster::start_timer works, which works correctly for me)As of the latest commit it now only allows void or dpp::task function return signatures as well.
Code change checklist