Commit ce657a74 by Jonathan Wakely Committed by Jonathan Wakely

Simplify std::scoped_lock destructor

	* include/std/mutex (scoped_lock::~scoped_lock()): Use fold
	expression.

From-SVN: r272187
parent cd0b94e6
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment