ScopeGuard is missing a deduction guide

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Service Arch 2021-09-20
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      We don't need makeGuard anymore.
      The constructor set for ScopeGuard isn't quite compatible with CTAD so we need to give it a little push in the right direction.

      template <typename F>
      ScopeGuard(F&&) -> ScopeGuard<std::decay_t<F>>;
      

      This would enable simpler initializer syntax for ScopeGuard objects.

      (forked from SERVER-53021)

            Assignee:
            Billy Donahue
            Reporter:
            Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: