diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/stc/carc.h | 6 | ||||
| -rw-r--r-- | include/stc/cbox.h | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/include/stc/carc.h b/include/stc/carc.h index a061a606..7f9c4390 100644 --- a/include/stc/carc.h +++ b/include/stc/carc.h @@ -143,8 +143,10 @@ _cx_memb(_reset_from)(_cx_self* self, i_val val) { *self = _cx_memb(_from)(val);
}
-STC_INLINE _cx_self
-_cx_memb(_make)(_cx_raw raw) { return _cx_memb(_from)(i_valfrom(raw)); }
+#if !defined _i_no_clone
+ STC_INLINE _cx_self
+ _cx_memb(_make)(_cx_raw raw) { return _cx_memb(_from)(i_valfrom(raw)); }
+#endif // !_i_no_clone
// does not use i_valfrom, so we can bypass c_no_clone
STC_INLINE _cx_self
diff --git a/include/stc/cbox.h b/include/stc/cbox.h index 690c8a7f..c2ecbae4 100644 --- a/include/stc/cbox.h +++ b/include/stc/cbox.h @@ -117,11 +117,11 @@ _cx_memb(_reset_from)(_cx_self* self, i_val val) { else self->get = c_new(i_val, val);
}
-STC_INLINE _cx_self
-_cx_memb(_make)(_cx_raw raw) { return _cx_memb(_from)(i_valfrom(raw)); }
-
#if !defined _i_no_clone
STC_INLINE _cx_self
+ _cx_memb(_make)(_cx_raw raw) { return _cx_memb(_from)(i_valfrom(raw)); }
+
+ STC_INLINE _cx_self
_cx_memb(_clone)(_cx_self other) {
if (!other.get) return other;
i_valraw r = i_valto(other.get);
@@ -134,7 +134,7 @@ _cx_memb(_make)(_cx_raw raw) { return _cx_memb(_from)(i_valfrom(raw)); } _cx_memb(_drop)(self);
*self = _cx_memb(_clone)(other);
}
-#endif
+#endif // !_i_no_clone
STC_INLINE void
_cx_memb(_take)(_cx_self* self, _cx_self other) {
|
