This is part of #46. AUTORET macro is no longer needed with C++14 decltype(auto)
cleanup: Remove AUTORET macro and clean up PassField overrides #64
pull ryanofsky wants to merge 5 commits into bitcoin-core:master from ryanofsky:pr/autoret changing 4 files +61 −64-
ryanofsky commented at 12:43 AM on December 31, 2021: collaborator
-
ea1a77b98b
Replace AUTO_RETURN uses with 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.
-
1d005053b0
Replace output.init AUTO_RETURN uses with decltype(auto)
Since decltype(auto) doesn't works inside SFINAE context, need to replace enable_if<output.init()> with enable_if<output.get()>
-
Consolidate PassField function to remove AUTO_RETURN uses 41db49c7bc
-
3f388cf064
Inline last AUTO_RETURN uses and remove macro
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.
-
cf7ebfe68d
Replace ThreadMap Passfield override with generic count(0) override
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 merged this on Dec 31, 2021
- ryanofsky closed this on Dec 31, 2021
- bitcoin-core locked this on Jun 25, 2025
Contributors
Linked (view graph)