util/IntrusiveHashSet: add missing Cast()/ToHook() functions to IntrusiveHashSetMemberHookTraits
This commit is contained in:
parent
fe3e1d31bf
commit
5945877313
|
@ -85,6 +85,14 @@ struct IntrusiveHashSetMemberHookTraits {
|
|||
|
||||
template<typename Dummy>
|
||||
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;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue