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

replace is_callable_v workaround with is_invocable_v; fixes build on clang12 #210

Open
wants to merge 1 commit into
base: eosio
Choose a base branch
from

Conversation

spoonincode
Copy link
Contributor

This removes the is_callable_v workaround and replaces it with std::is_invocable_v as the workaround is causing a

template argument for non-type template parameter must be an expression

error on clang12. Fixes clang12 and also is compiling on gcc8, clang6, and XCode 10.2 -- pretty much the bare minimum for eosio. But, I'm not sure if it's desirable for eos-vm to support a wider range of compilers and the workaround should be fixed instead. Or if I've just completely missed the purpose of this code in the first place... so please review carefully.

@swatanabe
Copy link

is_invokable_v is wrong. is_callable_v is used here to distinguish (member) function pointers from function objects. OTOH, I have no idea how the is_callable_v ever worked, as clang is obviously correct to diagnose it as an error.

@spoonincode
Copy link
Contributor Author

It would be useful to add a unit test that exercises this code then, as far as I can remember all unit tests did pass with is_invocable_v

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.

2 participants