brainboxdotcc / DPP

C++ Discord API Bot Library - D++ is Lightweight and scalable for small and huge bots!
https://dpp.dev/
Apache License 2.0
1.01k stars 155 forks source link

Add result_type member type to dpp::task #1165

Closed BowDown097 closed 1 month ago

BowDown097 commented 1 month ago

Pretty useful when working with templates (for example, this code I wrote, where I had to reproduce this with a false_type/true_type struct). Similar conveniences are part of quite a few STL template types too, namely std::function which I'd say is pretty similar.

Code change checklist

CLAassistant commented 1 month ago

CLA assistant check
All committers have signed the CLA.

netlify[bot] commented 1 month ago

Deploy Preview for dpp-dev ready!

Name Link
Latest commit 307993173c89060c4d91d80ef696eb4c0b47feda
Latest deploy log https://app.netlify.com/sites/dpp-dev/deploys/66670e719e04740008499112
Deploy Preview https://deploy-preview-1165--dpp-dev.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Mishura4 commented 1 month ago

Thank you for the contribution, that's a good idea for sure! Any chance you could add it to dpp::coroutine and dpp::async as well?