• Yedidya Feldblum's avatar
    Reimplement SCOPE_SUCCESS and SCOPE_FAIL on top of ScopeGuard · 87229af6
    Yedidya Feldblum authored
    Summary:
    [Folly] Reimplement `SCOPE_SUCCESS` and `SCOPE_FAIL` on top of `ScopeGuardImpl`.
    
    Allows the underlying type to be safely move-constructed, in case the compiler does not do RVO copy elision in pre-C++17 builds.
    
    Fixes #940.
    
    Reviewed By: ericniebler
    
    Differential Revision: D10120199
    
    fbshipit-source-id: 889b867041338d6b76a0af5f04076b16e3120f63
    87229af6
ScopeGuard.h 8.76 KB