Summary:
[Folly] Cut the `ScopeGuard` alias now that we have `auto`.
This form works because of hidden lifetime extension:
```lang=c++
folly::ScopeGuard guard = folly::makeGuard([] { /*...*/ });
// ...
// guard falls out of scope
```
But this form would not work correctly:
```lang=c++
folly::ScopeGuard guard = folly::makeGuard([] { /*...*/ });
std::async(std::launch::async, [guard = std::move(guard)] {});
```
Because `folly::ScopeGuard` is an rvalue-reference-to-base.
We have `auto`, so just remove `folly::ScopeGuard`. This form works correctly:
```lang=c++
auto guard = folly::makeGuard([] { /*...*/ });
std::async(std::launch::async, [guard = std::move(guard)] {});
```
Reviewed By: igorsugak
Differential Revision: D6690070
fbshipit-source-id: 54e32b300d36fce4eb95a59f1828819afe312ec0
Summary:
[Folly] Move `ScopeGuardImpl` and `ScopeGuardImplBase` into the `detail` namespace.
Let them be marked as private implementation details.
Reviewed By: andrewjcg
Differential Revision: D6665317
fbshipit-source-id: 03e8fee6a16338395ec92c582613b053bd9f74ec