Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation failures in C++20 due to removal of std::result_of #46

Closed
IanLilleyT opened this issue Dec 20, 2021 · 2 comments · Fixed by #47
Closed

Compilation failures in C++20 due to removal of std::result_of #46

IanLilleyT opened this issue Dec 20, 2021 · 2 comments · Fixed by #47

Comments

@IanLilleyT
Copy link
Contributor

IanLilleyT commented Dec 20, 2021

I'm using asyncplusplus from a C++20 project and it's failing to compile because std::result_of was removed in C++20. I worked around this problem by replacing std::result_of with std::invoke_result in my fork. You can see the changes here: https://github.com/IanLilleyT/asyncplusplus/commit/1a9cbc504eb675e42524c44f9ecf46973574b257. I opened an issue instead of a PR because I'm not sure if this library wants to include C++17 code in its headers, even if it's behind a macro. Let me know if I should turn this into a PR or not.

The cmake code / comment is partly taken from: https://stackoverflow.com/a/60890947

Thanks for reading!

@Amanieu
Copy link
Owner

Amanieu commented Dec 20, 2021

Sure! I'm happy to accept a PR for this.

@IanLilleyT
Copy link
Contributor Author

Thanks for the super fast turnaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants