diff options
| author | Tyge Lovset <[email protected]> | 2022-08-11 22:21:17 +0200 |
|---|---|---|
| committer | Tyge Lovset <[email protected]> | 2022-08-11 22:21:17 +0200 |
| commit | 3c110651771642cf28d6998e101a197b0cb02a4b (patch) | |
| tree | 8d3952bb1e462311516b6cbc94eb1e88f35f7a10 /include/stc/cbox.h | |
| parent | 5cf6b762012168be51b32a1a85ab2bc33504f020 (diff) | |
| download | STC-modified-3c110651771642cf28d6998e101a197b0cb02a4b.tar.gz STC-modified-3c110651771642cf28d6998e101a197b0cb02a4b.zip | |
Added cmp, eq, hash to carc/cbox.
Diffstat (limited to 'include/stc/cbox.h')
| -rw-r--r-- | include/stc/cbox.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/stc/cbox.h b/include/stc/cbox.h index 467dd645..d26a63c8 100644 --- a/include/stc/cbox.h +++ b/include/stc/cbox.h @@ -182,4 +182,14 @@ STC_INLINE bool _cx_memb(_value_eq)(const _cx_value* x, const _cx_value* y) { return i_eq((&rx), (&ry)); #endif } + +STC_INLINE uint64_t _cx_memb(_hash)(const _cx_self* x) + { return _cx_memb(_value_hash)(x->get); } + +STC_INLINE int _cx_memb(_cmp)(const _cx_self* x, const _cx_self* y) + { return _cx_memb(_value_cmp)(x->get, y->get); } + +STC_INLINE bool _cx_memb(_eq)(const _cx_self* x, const _cx_self* y) + { return _cx_memb(_value_eq)(x->get, y->get); } + #include "template.h" |
