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

fix: when use c++ 20, compile failed #73

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wendajiang
Copy link

No description provided.

@Doralitze
Copy link

@muellan Is there any chance that this will be merged upstream? The default C++ version is now 23 and std::result_of is long gone. We really need this.

include/clipp.h Outdated
std::is_same<Ret,typename std::result_of<Fn(Args...)>::type>::value>{} );
std::is_same<Ret,
#if CLIPP_CPLUSPLUS >= 201703L
typename std::invoke_result<Fn(Args...)>::type

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using Apple Clang version 14.0.3 (C++17, C++20), this will not compile.
Shouldn't it be typename std::invoke_result<Fn, Args...> ?
One can also use the shorter version std::invoke_result_t<Fn, Args...>.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix it.

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 this pull request may close these issues.

None yet

3 participants