Simplify std::scoped_lock destructor
* include/std/mutex (scoped_lock::~scoped_lock()): Use fold expression. From-SVN: r272187
This commit is contained in:
parent
cd0b94e650
commit
ce657a7414
@ -1,5 +1,8 @@
|
||||
2019-06-12 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
* include/std/mutex (scoped_lock::~scoped_lock()): Use fold
|
||||
expression.
|
||||
|
||||
* include/Makefile.am: Add new <bits/charconv.h> header.
|
||||
* include/Makefile.in: Regenerate.
|
||||
* include/bits/basic_string.h (to_string(int), to_string(unsigned))
|
||||
|
@ -576,11 +576,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
{ } // calling thread owns mutex
|
||||
|
||||
~scoped_lock()
|
||||
{
|
||||
std::apply([](_MutexTypes&... __m) {
|
||||
char __i[] __attribute__((__unused__)) = { (__m.unlock(), 0)... };
|
||||
}, _M_devices);
|
||||
}
|
||||
{ std::apply([](auto&... __m) { (__m.unlock(), ...); }, _M_devices); }
|
||||
|
||||
scoped_lock(const scoped_lock&) = delete;
|
||||
scoped_lock& operator=(const scoped_lock&) = delete;
|
||||
|
Loading…
Reference in New Issue
Block a user