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/carc.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/carc.h')
| -rw-r--r-- | include/stc/carc.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/stc/carc.h b/include/stc/carc.h index 62b33bed..20ba26b0 100644 --- a/include/stc/carc.h +++ b/include/stc/carc.h @@ -197,6 +197,16 @@ 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); } + #undef _i_atomic_inc #undef _i_atomic_dec_and_test #include "template.h" |
