Skip to content

Commit c110f42

Browse files
committed
Simplify inner lambda in try_lock_until_impl
I now doesn't require the deduction of Clock and Duration. Signed-off-by: Ted Lyngmo <[email protected]>
1 parent 8a1a75c commit c110f42

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

include/beman/timed_lock_alg/mutex.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,8 @@ template <class Timepoint, class Locks, class... Seqs>
6969
int try_lock_until_impl(const Timepoint& end_time, Locks locks, type_pack<Seqs...>) {
7070
// an array with one function per lockable/sequence to try:
7171
std::array<result (*)(const Timepoint&, Locks&), sizeof...(Seqs)> seqs{{+[](const Timepoint& tp, Locks& lks) {
72-
return []<class Clock, class Duration, std::size_t I0, std::size_t... Is>(
73-
const std::chrono::time_point<Clock, Duration>& itp,
74-
Locks& lcks,
75-
std::index_sequence<I0, Is...>) -> result {
72+
return []<class Tp, std::size_t I0, std::size_t... Is>(
73+
const Tp& itp, Locks& lcks, std::index_sequence<I0, Is...>) -> result {
7674
if (std::unique_lock first{std::get<I0>(lcks), itp}) {
7775
int res = friendly_try_lock(std::get<Is>(lcks)...);
7876
if (res == -1) {

0 commit comments

Comments
 (0)