[SERVER-24475] Replace Loki MAKE_GUARD and ScopeGuard with homegrown C++11 versions Created: 08/Jun/16  Updated: 02/Sep/21  Resolved: 04/Jun/19

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Won't Fix Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-19227 Re-implement ScopeGuard with C++11 fa... Closed
Related
related to SERVER-53021 Directly define ScopeGuards: sunset m... Backlog
Sprint: Platforms 2017-03-06, Platforms 2017-04-17, Platforms 2017-05-08, Platforms 2017-12-04, Platforms 2017-12-18, Platforms 2018-01-01, Platforms 2018-01-15, Platforms 2018-03-26
Participants:

 Description   

The vast majority of the code in mongo/util/scopeguard.h is no longer necessary as it represents pre-C++14 approaches to building a guard class.

We should

  • Write our own ScopeGuard class
  • Write a makeGuard utility function that takes a callable
  • Remove the BLOCK_EXIT macros
  • Replace all uses of BLOCK_EXIT with a call to makeGuard

Generated at Thu Feb 08 04:06:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.