30template <
typename Lock,
typename =
void>
33template <
typename Lock>
35 std::void_t<decltype(std::declval<Lock>().lock()),
36 decltype(std::declval<Lock>().unlock())>>
40template <
typename Lock>
47template <
typename Lock,
typename =
void>
50template <
typename Lock>
51struct is_lockable<Lock, std::void_t<decltype(std::declval<Lock>().try_lock())>>
55template <
typename Lock>
63template <
typename Lock,
typename Duration,
typename =
void>
66template <
typename Lock,
typename Duration>
69 std::void_t<decltype(std::declval<Lock>().try_lock_for(
70 std::declval<Duration>()))>> :
is_lockable<Lock> {};
73template <
typename Lock,
typename Duration>
82template <
typename Lock,
typename TimePo
int,
typename =
void>
85template <
typename Lock,
typename TimePo
int>
89 std::void_t<decltype(std::declval<Lock>().try_lock_until(
90 std::declval<TimePoint>()))>> :
is_lockable<Lock> {};
93template <
typename Lock,
typename TimePo
int>
101template <
typename Lock,
typename Clock>
103 : std::integral_constant<
105 is_lockable_for_v<Lock, typename Clock::duration> &&
106 is_lockable_until_v<Lock, typename Clock::time_point>> {};
109template <
typename Lock,
typename Clock>
constexpr bool is_timed_lockable_v
Helper variable template for is_timed_lockable<Lock, Clock>::value.
Definition: lock_traits.h:110
constexpr bool is_lockable_v
Helper variable template for is_lockable<Lock>::value.
Definition: lock_traits.h:56
constexpr bool is_basic_lockable_v
Helper variable template for is_basic_lockable<Lock>::value.
Definition: lock_traits.h:41
constexpr bool is_lockable_until_v
Helper variable template for is_lockable_until<Lock, TimePoint>::value.
Definition: lock_traits.h:94
constexpr bool is_lockable_for_v
Helper variable template for is_lockable_for<Lock, Duration>::value.
Definition: lock_traits.h:74
Definition: binary_semaphore.h:26
Definition: lock_traits.h:31
Definition: lock_traits.h:64
Definition: lock_traits.h:83
Definition: lock_traits.h:48
Definition: lock_traits.h:106