10 static constexpr auto kMask =
~std::uintptr_t{1};
16 :
_state{
reinterpret_cast<std::uintptr_t
>(
ptr) |
static_cast<std::uintptr_t
>(
owns)} {
20 other._state &= kMask;
33 return reinterpret_cast<void*
>(
_state & kMask);
void Swap(GuardState &other) noexcept
void * ReleaseState() noexcept
GuardState & operator=(GuardState &&other) noexcept
bool Owns() const noexcept
GuardState(GuardState &&other) noexcept
void * UnlockState() noexcept
GuardState() noexcept=default
void * LockState() noexcept
#define YACLIB_DEBUG(cond, message)
Contract< V, E > MakeContract()
Creates related future and promise.