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
  1. ryanofsky commented at 12:43 AM on December 31, 2021: collaborator

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

  2. 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.
    ea1a77b98b
  3. 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()>
    1d005053b0
  4. Consolidate PassField function to remove AUTO_RETURN uses 41db49c7bc
  5. 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.
    3f388cf064
  6. 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.
    cf7ebfe68d
  7. ryanofsky merged this on Dec 31, 2021
  8. ryanofsky closed this on Dec 31, 2021

  9. bitcoin-core locked this on Jun 25, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/libmultiprocess. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-18 15:30 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me