diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-06-12 15:52:06 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-06-12 15:52:06 +0100 |
commit | ce657a74143a11bfa43f5d334b11b57954568f12 (patch) | |
tree | f660d0a42132404c174a91c425ef487a20bc32d6 /libstdc++-v3/include/std/mutex | |
parent | cd0b94e650a880b2ab04922e476aa28007277d5c (diff) | |
download | gcc-ce657a74143a11bfa43f5d334b11b57954568f12.tar.gz |
Simplify std::scoped_lock destructor
* include/std/mutex (scoped_lock::~scoped_lock()): Use fold
expression.
From-SVN: r272187
Diffstat (limited to 'libstdc++-v3/include/std/mutex')
-rw-r--r-- | libstdc++-v3/include/std/mutex | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libstdc++-v3/include/std/mutex b/libstdc++-v3/include/std/mutex index ca2c669db9a..981b6725f7c 100644 --- a/libstdc++-v3/include/std/mutex +++ b/libstdc++-v3/include/std/mutex @@ -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; |