Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-59753

ScopeGuard is missing a deduction guide

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

      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@mongodb.com Billy Donahue
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: