summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/stc/carc.h1
-rw-r--r--include/stc/cbox.h1
-rw-r--r--include/stc/template.h8
3 files changed, 6 insertions, 4 deletions
diff --git a/include/stc/carc.h b/include/stc/carc.h
index d8626e2d..03f91be7 100644
--- a/include/stc/carc.h
+++ b/include/stc/carc.h
@@ -215,5 +215,4 @@ STC_INLINE bool _cx_memb(_eq)(const _cx_self* x, const _cx_self* y) {
}
#undef _i_atomic_inc
#undef _i_atomic_dec_and_test
-#undef _i_no_hash
#include "template.h"
diff --git a/include/stc/cbox.h b/include/stc/cbox.h
index b8934e46..c690bec7 100644
--- a/include/stc/cbox.h
+++ b/include/stc/cbox.h
@@ -188,5 +188,4 @@ STC_INLINE bool _cx_memb(_eq)(const _cx_self* x, const _cx_self* y) {
_cx_raw rx = i_keyto(x->get), ry = i_keyto(y->get);
return _cx_memb(_raw_eq)(&rx, &ry);
}
-#undef _i_no_hash
#include "template.h"
diff --git a/include/stc/template.h b/include/stc/template.h
index 42a07634..e9fbcfba 100644
--- a/include/stc/template.h
+++ b/include/stc/template.h
@@ -140,10 +140,13 @@
#ifndef i_keydrop
#define i_keydrop c_paste(i_key, _drop)
#endif
- #if defined i_rawclass && !defined i_cmp && !defined _i_no_cmp
+#endif
+
+#ifdef i_rawclass
+ #if !defined i_cmp && !defined _i_no_cmp
#define i_cmp c_paste(i_keyraw, _cmp)
#endif
- #if defined i_rawclass && !defined i_hash && !defined _i_no_hash
+ #if !defined i_hash && !defined _i_no_hash
#define i_hash c_paste(i_keyraw, _hash)
#endif
#endif
@@ -317,6 +320,7 @@
#undef _i_prefix
#undef _i_has_from
#undef _i_no_cmp
+#undef _i_no_hash
#undef _i_no_clone
#undef _i_no_emplace
#undef _i_template