Commit graph

2 commits

Author SHA1 Message Date
Luis Hector Chavez
b77035b89a Allow android::base::ScopeGuard in STL containers
This change lets android::base::ScopeGuard be useful in STL containers
(e.g. std::vector<android::base::ScopeGuard<std::function<void()>>>). It
also provides perfect forwarding for android::base::make_scope_guard.

Bug: 34764308
Test: libbase_test

Change-Id: I7d1e5494b0f0695763cff0700efdb9ec18ae85c8
2018-03-26 13:30:09 -07:00
Tom Cherry
eb927824bf Add android::base::ScopeGuard
Taken from bionic/libc/private/ScopeGuard.h.

Test: New unit tests
Change-Id: If83c1990efbf294aee0b5d40a7a9ac326e5e765e
2017-04-06 12:49:47 -07:00