JH-Toolkit v1.4.1
An engineering-oriented C++20 toolkit with duck-typed concepts, static design, async coroutines, and semantic containers — header-only, RTTI-free, and concurrency-friendly.
Loading...
Searching...
No Matches
jh::concepts::basic_lockable Concept Reference

Concept for basic lockable objects. More...

#include <jh/conceptual/mutex_like.h>

Concept definition

template<typename M>
concept basic_lockable = requires(M m) {
{ m.lock() } -> std::same_as<void>;
{ m.unlock() } -> std::same_as<void>;
}
Concept for basic lockable objects.
Definition mutex_like.h:73

Detailed Description

Concept for basic lockable objects.

Requires only lock() and unlock(). Equivalent to the minimal requirement of std::mutex.

Examples: