summaryrefslogtreecommitdiffhomepage
path: root/include/stc/carc.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-10-24 23:45:53 +0200
committerTyge Løvset <[email protected]>2022-10-24 23:45:53 +0200
commit538fdd51a7e530adf2ab31a76deb9ac8e52f525e (patch)
tree746b3d24a8bd30e1a61cee34c51e281ad69b501f /include/stc/carc.h
parentcf2ff10878153588b69e7e34523773e2bc42d79e (diff)
downloadSTC-modified-538fdd51a7e530adf2ab31a76deb9ac8e52f525e.tar.gz
STC-modified-538fdd51a7e530adf2ab31a76deb9ac8e52f525e.zip
Fix in cbox/carc.
Diffstat (limited to 'include/stc/carc.h')
-rw-r--r--include/stc/carc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/stc/carc.h b/include/stc/carc.h
index e061aa2c..91de0931 100644
--- a/include/stc/carc.h
+++ b/include/stc/carc.h
@@ -149,8 +149,13 @@ STC_INLINE void _cx_memb(_reset_to)(_cx_self* self, _cx_value* p) {
*self = _cx_memb(_from_ptr)(p);
}
+#ifndef _i_no_emplace
STC_INLINE _cx_self _cx_memb(_new)(_cx_raw raw)
{ return _cx_memb(_from)(i_keyfrom(raw)); }
+#else
+STC_INLINE _cx_self _cx_memb(_new)(_cx_value val)
+ { return _cx_memb(_from)(val); }
+#endif
// does not use i_keyclone, so OK to always define.
STC_INLINE _cx_self _cx_memb(_clone)(_cx_self ptr) {