Update threaded_queue.h

https://en.cppreference.com/w/cpp/language/fold
This commit is contained in:
Amos Bird 2018-09-26 17:09:30 +08:00 committed by GitHub
parent 41fcc0272c
commit dd039fd09e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,8 +48,7 @@ private:
}
template <size_t... Is> void unlock_impl(std::index_sequence<Is...>) {
(void)std::initializer_list<int>{
(std::get<Is>(tuple_)->mutex_.unlock(), 0)...};
(std::get<Is>(tuple_)->mutex_.unlock(), ...);
}
std::tuple<Queue...> tuple_;