util/IntrusiveHashSet: add missing Cast()/ToHook() functions to IntrusiveHashSetMemberHookTraits
This commit is contained in:

committed by
Max Kellermann

parent
fe3e1d31bf
commit
5945877313
@@ -85,6 +85,14 @@ struct IntrusiveHashSetMemberHookTraits {
|
|||||||
|
|
||||||
template<typename Dummy>
|
template<typename Dummy>
|
||||||
using Hook = _Hook;
|
using Hook = _Hook;
|
||||||
|
|
||||||
|
static constexpr T *Cast(Hook<T> *node) noexcept {
|
||||||
|
return &ContainerCast(*node, member);
|
||||||
|
}
|
||||||
|
|
||||||
|
static constexpr auto &ToHook(T &t) noexcept {
|
||||||
|
return t.*member;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user