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

cleanup: Remove AUTORET macro and clean up PassField overrides #64

Merged
merged 5 commits into from
Dec 31, 2021

Conversation

ryanofsky
Copy link
Collaborator

This is part of #46. AUTORET macro is no longer needed with C++14 decltype(auto)

Can't use decltype(auto) everywhere because it doesn't seem to work in
SFINAE contexts. Substitution failure leads to compile errors instead of
just silently dropping functions from overload set.
Since decltype(auto) doesn't works inside SFINAE context, need to
replace enable_if<output.init()> with enable_if<output.get()>
Need to use decltype(expression) instead of decltype(auto) for get()
methods, because they are used in SFINAE contexts to detect whether
function arguments are input or output arguments.  For output-only
arguments, getParams().getXXX() method won't exist, so get method
shouldn't be declared. For input-only arguments, getResult().getXXX()
method won't exist, so get method shouldn't be declared.
This override is useful for other count(0) parameters, not just
ThreadMap, so no reason it needs to be specific to ThreadMap.

This commit follows up earlier commit cleaning up and unifying PassField
functions.
@ryanofsky ryanofsky merged commit bc6624a into chaincodelabs:master Dec 31, 2021
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.

1 participant