summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/stc/carc.h10
-rw-r--r--include/stc/cbox.h10
2 files changed, 20 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"
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"