summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/stc/alt/clist.h8
-rw-r--r--include/stc/alt/csmap.h14
-rw-r--r--include/stc/carr2.h3
-rw-r--r--include/stc/carr3.h3
-rw-r--r--include/stc/cbox.h3
-rw-r--r--include/stc/cdeq.h12
-rw-r--r--include/stc/clist.h12
-rw-r--r--include/stc/cmap.h16
-rw-r--r--include/stc/cpque.h7
-rw-r--r--include/stc/csmap.h22
-rw-r--r--include/stc/cstack.h7
-rw-r--r--include/stc/cvec.h8
-rw-r--r--include/stc/template.h4
13 files changed, 68 insertions, 51 deletions
diff --git a/include/stc/alt/clist.h b/include/stc/alt/clist.h
index 7a4ede57..9ab4cce6 100644
--- a/include/stc/alt/clist.h
+++ b/include/stc/alt/clist.h
@@ -88,7 +88,7 @@ STC_API size_t _clist_count(const clist_VOID* self);
STC_INLINE bool _cx_memb(_empty)(_cx_self lst) { return lst.last == NULL; } \
STC_INLINE size_t _cx_memb(_count)(_cx_self lst) { return _clist_count((const clist_VOID*) &lst); } \
STC_INLINE i_val _cx_memb(_value_fromraw)(i_valraw raw) { return i_valfrom(raw); } \
- STC_INLINE i_val _cx_memb(_value_clone)(i_val val) { return i_valfrom(i_valto(&val)); } \
+ STC_INLINE i_val _cx_memb(_value_clone)(i_val val) { i_valraw _r = i_valto((&val)); return i_valfrom(_r); } \
STC_INLINE void _cx_memb(_clear)(_cx_self* self) { _cx_memb(_drop)(self); } \
STC_INLINE void _cx_memb(_emplace_back)(_cx_self* self, i_valraw raw) \
{ _cx_memb(_push_back)(self, i_valfrom(raw)); } \
@@ -242,7 +242,7 @@ STC_API size_t _clist_count(const clist_VOID* self);
_cx_node* prev = self->last, *node; \
while (prev) { \
node = prev->next; \
- i_valraw r = i_valto(&node->value); \
+ i_valraw r = i_valto((&node->value)); \
if (i_cmp((&r), (&val)) == 0) \
prev = _cx_memb(_erase_after_)(self, prev), ++n; \
else \
@@ -281,8 +281,8 @@ STC_API size_t _clist_count(const clist_VOID* self);
\
STC_DEF int \
_cx_memb(_sort_cmp_)(const void* x, const void* y) { \
- i_valraw a = i_valto(&((_cx_node *) x)->value); \
- i_valraw b = i_valto(&((_cx_node *) y)->value); \
+ i_valraw a = i_valto((&((_cx_node *) x)->value)); \
+ i_valraw b = i_valto((&((_cx_node *) y)->value)); \
return i_cmp((&a), (&b)); \
} \
\
diff --git a/include/stc/alt/csmap.h b/include/stc/alt/csmap.h
index 948e878b..deb071f7 100644
--- a/include/stc/alt/csmap.h
+++ b/include/stc/alt/csmap.h
@@ -111,7 +111,7 @@ int main(void) {
STC_INLINE void \
_cx_memb(_value_clone)(_cx_value* dst, _cx_value* val) { \
*_i_keyref(dst) = i_keyfrom(i_keyto(_i_keyref(val))); \
- _i_MAP_ONLY( dst->second = i_valfrom(i_valto(&val->second)); ) \
+ _i_MAP_ONLY( i_valraw r = i_valto((&val->second)); dst->second = i_valfrom(r); ) \
} \
\
STC_INLINE _cx_result \
@@ -132,18 +132,18 @@ int main(void) {
\
STC_INLINE _cx_result \
_cx_memb(_insert)(_cx_self* self, i_key key _i_MAP_ONLY(, i_val mapped)) { \
- _cx_result res = _cx_memb(_insert_entry_)(self, i_keyto(&key)); \
+ _cx_result res = _cx_memb(_insert_entry_)(self, i_keyto((&key))); \
if (res.inserted) {*_i_keyref(res.ref) = key; _i_MAP_ONLY( res.ref->second = mapped; )} \
- else {i_keydrop(&key); _i_MAP_ONLY( i_valdrop((&mapped)); )} \
+ else {i_keydrop((&key)); _i_MAP_ONLY( i_valdrop((&mapped)); )} \
return res; \
} \
\
_i_MAP_ONLY( \
STC_INLINE _cx_result \
_cx_memb(_insert_or_assign)(_cx_self* self, i_key key, i_val mapped) { \
- _cx_result res = _cx_memb(_insert_entry_)(self, i_keyto(&key)); \
+ _cx_result res = _cx_memb(_insert_entry_)(self, i_keyto((&key))); \
if (res.inserted) res.ref->first = key; \
- else {i_keydrop(&key); i_valdrop((&res.ref->second)); } \
+ else {i_keydrop((&key)); i_valdrop((&res.ref->second)); } \
res.ref->second = mapped; return res; \
} \
\
@@ -370,12 +370,12 @@ static csmap_SENTINEL_node _aatree_sentinel = {&_aatree_sentinel, &_aatree_senti
if (!it2.ref) { while (it1.ref) it1 = _cx_memb(_erase_at)(self, it1); \
return it1; } \
_cx_key k1 = *_i_keyref(it1.ref), k2 = *_i_keyref(it2.ref); \
- _cx_rawkey r1 = i_keyto(&k1); \
+ _cx_rawkey r1 = i_keyto((&k1)); \
for (;;) { \
if (memcmp(&k1, &k2, sizeof k1) == 0) return it1; \
_cx_memb(_next)(&it1); k1 = *_i_keyref(it1.ref); \
_cx_memb(_erase)(self, r1); \
- _cx_memb(_find_it)(self, (r1 = i_keyto(&k1)), &it1); \
+ _cx_memb(_find_it)(self, (r1 = i_keyto((&k1))), &it1); \
} \
} \
\
diff --git a/include/stc/carr2.h b/include/stc/carr2.h
index a9c19175..6086c926 100644
--- a/include/stc/carr2.h
+++ b/include/stc/carr2.h
@@ -118,8 +118,9 @@ STC_DEF _cx_self _cx_memb(_with_values)(size_t xdim, size_t ydim, i_val value) {
STC_DEF _cx_self _cx_memb(_clone)(_cx_self src) {
_cx_self _arr = _cx_memb(_init)(src.xdim, src.ydim);
+ i_valraw r;
for (_cx_value* p = _arr.data[0], *q = src.data[0], *e = p + _cx_memb(_size)(src); p != e; ++p, ++q)
- *p = i_valfrom(i_valto(q));
+ r = i_valto(q), *p = i_valfrom(r);
return _arr;
}
diff --git a/include/stc/carr3.h b/include/stc/carr3.h
index c215bd80..f7ec3227 100644
--- a/include/stc/carr3.h
+++ b/include/stc/carr3.h
@@ -123,8 +123,9 @@ STC_DEF _cx_self _cx_memb(_with_values)(size_t xdim, size_t ydim, size_t zdim, i
STC_DEF _cx_self _cx_memb(_clone)(_cx_self src) {
_cx_self _arr = _cx_memb(_init)(src.xdim, src.ydim, src.zdim);
+ i_valraw r;
for (_cx_value* p = **_arr.data, *q = **src.data, *e = p + _cx_memb(_size)(src); p != e; ++p, ++q)
- *p = i_valfrom(i_valto(q));
+ r = i_valto(q), *p = i_valfrom(r);
return _arr;
}
diff --git a/include/stc/cbox.h b/include/stc/cbox.h
index 85d46a5e..e43cf76c 100644
--- a/include/stc/cbox.h
+++ b/include/stc/cbox.h
@@ -124,7 +124,8 @@ _cx_memb(_reset_from)(_cx_self* self, i_val val) {
STC_INLINE _cx_self
_cx_memb(_clone)(_cx_self other) {
if (!other.get) return other;
- return c_make(_cx_self){c_new(i_val, i_valfrom(i_valto(other.get)))};
+ i_valraw r = i_valto(other.get);
+ return c_make(_cx_self){c_new(i_val, i_valfrom(r))};
}
STC_INLINE void
diff --git a/include/stc/cdeq.h b/include/stc/cdeq.h
index ddf6eb01..5113af8c 100644
--- a/include/stc/cdeq.h
+++ b/include/stc/cdeq.h
@@ -75,7 +75,7 @@ STC_INLINE _cx_value* _cx_memb(_emplace_back)(_cx_self* self, i_valraw raw)
{ return _cx_memb(_push)(self, i_valfrom(raw)); }
#endif
STC_INLINE i_val _cx_memb(_value_clone)(i_val val)
- { return i_valfrom(i_valto(&val)); }
+ { i_valraw r = i_valto((&val)); return i_valfrom(r); }
STC_INLINE void _cx_memb(_copy)(_cx_self *self, _cx_self other) {
if (self->data == other.data) return;
_cx_memb(_drop)(self); *self = _cx_memb(_clone)(other);
@@ -312,7 +312,9 @@ _cx_memb(_clone)(_cx_self cx) {
const size_t sz = cdeq_rep_(&cx)->size;
_cx_self out = _cx_memb(_with_capacity)(sz);
cdeq_rep_(&out)->size = sz;
- for (size_t i = 0; i < sz; ++i) out.data[i] = i_valfrom(i_valto(&cx.data[i]));
+ i_valraw _r;
+ for (size_t i = 0; i < sz; ++i)
+ _r = i_valto((cx.data + i)), out.data[i] = i_valfrom(_r);
return out;
}
#endif
@@ -384,7 +386,7 @@ STC_DEF _cx_iter
_cx_memb(_emplace_range_p)(_cx_self* self, _cx_value* pos, const _cx_raw* p1, const _cx_raw* p2) {
pos = _cx_memb(_insert_space_)(self, pos, p2 - p1);
_cx_iter it = {pos};
- for (; p1 != p2; ++p1) *pos++ = i_valfrom(*p1);
+ for (; p1 != p2; ++p1) *pos++ = i_valfrom((*p1));
return it;
}
#endif
@@ -394,7 +396,9 @@ _cx_memb(_clone_range_p)(_cx_self* self, _cx_value* pos,
const _cx_value* p1, const _cx_value* p2) {
pos = _cx_memb(_insert_space_)(self, pos, p2 - p1);
_cx_iter it = {pos};
- for (; p1 != p2; ++p1) *pos++ = i_valfrom(i_valto(p1));
+ i_valraw r;
+ for (; p1 != p2; ++p1)
+ r = i_valto(p1), *pos++ = i_valfrom(r);
return it;
}
#endif // !_i_no_clone
diff --git a/include/stc/clist.h b/include/stc/clist.h
index bf5201e7..ed8bb1ca 100644
--- a/include/stc/clist.h
+++ b/include/stc/clist.h
@@ -109,7 +109,7 @@ STC_API _cx_node* _cx_memb(_erase_after_)(_cx_self* self, _cx_node* node);
#if !defined _i_no_clone
STC_API _cx_self _cx_memb(_clone)(_cx_self cx);
STC_INLINE i_val _cx_memb(_value_clone)(i_val val)
- { return i_valfrom(i_valto(&val)); }
+ { i_valraw r = i_valto((&val)); return i_valfrom(r); }
STC_INLINE void
_cx_memb(_copy)(_cx_self *self, _cx_self other) {
if (self->last == other.last) return;
@@ -192,7 +192,9 @@ _cx_memb(_get_mut)(_cx_self* self, i_valraw val) {
STC_DEF _cx_self
_cx_memb(_clone)(_cx_self cx) {
_cx_self out = _cx_memb(_init)();
- c_foreach (it, _cx_self, cx) _cx_memb(_push_back)(&out, i_valfrom(i_valto(it.ref)));
+ i_valraw r;
+ c_foreach (it, _cx_self, cx)
+ r = i_valto(it.ref), _cx_memb(_push_back)(&out, i_valfrom(r));
return out;
}
#endif
@@ -298,7 +300,7 @@ _cx_memb(_remove)(_cx_self* self, i_valraw val) {
_cx_node* prev = self->last, *node;
while (prev) {
node = prev->next;
- i_valraw r = i_valto(&node->value);
+ i_valraw r = i_valto((&node->value));
if (i_cmp((&r), (&val)) == 0)
prev = _cx_memb(_erase_after_)(self, prev), ++n;
else
@@ -309,8 +311,8 @@ _cx_memb(_remove)(_cx_self* self, i_valraw val) {
static int
_cx_memb(_sort_cmp_)(const clist_VOID_node* x, const clist_VOID_node* y) {
- i_valraw a = i_valto(&((const _cx_node *) x)->value);
- i_valraw b = i_valto(&((const _cx_node *) y)->value);
+ i_valraw a = i_valto((&((const _cx_node *) x)->value));
+ i_valraw b = i_valto((&((const _cx_node *) y)->value));
return i_cmp((&a), (&b));
}
diff --git a/include/stc/cmap.h b/include/stc/cmap.h
index 0873b155..707e26f0 100644
--- a/include/stc/cmap.h
+++ b/include/stc/cmap.h
@@ -133,8 +133,8 @@ STC_INLINE void _cx_memb(_copy)(_cx_self *self, _cx_self other) {
STC_INLINE _cx_value
_cx_memb(_value_clone)(_cx_value _val) {
- *_i_keyref(&_val) = i_keyfrom(i_keyto(_i_keyref(&_val)));
- _i_MAP_ONLY( _val.second = i_valfrom(i_valto(&_val.second)); )
+ i_keyraw k = i_keyto(_i_keyref(&_val)); *_i_keyref(&_val) = i_keyfrom(k);
+ _i_MAP_ONLY( i_valraw m = i_valto((&_val.second)); _val.second = i_valfrom(m); )
return _val;
}
#if !defined _i_no_emplace
@@ -153,7 +153,7 @@ _cx_memb(_emplace)(_cx_self* self, i_keyraw rkey _i_MAP_ONLY(, i_valraw rmapped)
STC_INLINE _cx_raw
_cx_memb(_value_toraw)(_cx_value* val) {
return _i_SET_ONLY( i_keyto(val) )
- _i_MAP_ONLY( c_make(_cx_raw){i_keyto(&val->first), i_valto(&val->second)} );
+ _i_MAP_ONLY( c_make(_cx_raw){i_keyto((&val->first)), i_valto((&val->second))} );
}
STC_INLINE void
@@ -164,9 +164,9 @@ _cx_memb(_value_drop)(_cx_value* _val) {
STC_INLINE _cx_result
_cx_memb(_insert)(_cx_self* self, i_key _key _i_MAP_ONLY(, i_val _mapped)) {
- _cx_result _res = _cx_memb(_insert_entry_)(self, i_keyto(&_key));
+ _cx_result _res = _cx_memb(_insert_entry_)(self, i_keyto((&_key)));
if (_res.inserted) { *_i_keyref(_res.ref) = _key; _i_MAP_ONLY( _res.ref->second = _mapped; )}
- else { i_keydrop(&_key); _i_MAP_ONLY( i_valdrop((&_mapped)); )}
+ else { i_keydrop((&_key)); _i_MAP_ONLY( i_valdrop((&_mapped)); )}
return _res;
}
@@ -270,9 +270,9 @@ STC_DEF void _cx_memb(_clear)(_cx_self* self) {
#if !defined _i_isset
STC_DEF _cx_result
_cx_memb(_insert_or_assign)(_cx_self* self, i_key _key, i_val _mapped) {
- _cx_result _res = _cx_memb(_insert_entry_)(self, i_keyto(&_key));
+ _cx_result _res = _cx_memb(_insert_entry_)(self, i_keyto((&_key)));
if (_res.inserted) _res.ref->first = _key;
- else { i_keydrop(&_key); i_valdrop((&_res.ref->second)); }
+ else { i_keydrop((&_key)); i_valdrop((&_res.ref->second)); }
_res.ref->second = _mapped; return _res;
}
@@ -282,7 +282,7 @@ STC_DEF void _cx_memb(_clear)(_cx_self* self) {
_cx_memb(_emplace_or_assign)(_cx_self* self, i_keyraw rkey, i_valraw rmapped) {
_cx_result _res = _cx_memb(_insert_entry_)(self, rkey);
if (_res.inserted) _res.ref->first = i_keyfrom(rkey);
- else i_valdrop((&_res.ref->second));
+ else { i_valdrop((&_res.ref->second)); }
_res.ref->second = i_valfrom(rmapped); return _res;
}
#endif
diff --git a/include/stc/cpque.h b/include/stc/cpque.h
index 23c81ab8..3a4528ec 100644
--- a/include/stc/cpque.h
+++ b/include/stc/cpque.h
@@ -96,7 +96,7 @@ STC_INLINE void _cx_memb(_copy)(_cx_self *self, _cx_self other) {
_cx_memb(_drop)(self); *self = _cx_memb(_clone)(other);
}
STC_INLINE i_val _cx_memb(_value_clone)(_cx_value val)
- { return i_valfrom(i_valto(&val)); }
+ { i_valraw r = i_valto((&val)); return i_valfrom(r); }
#if !defined _i_no_emplace
STC_INLINE void _cx_memb(_emplace)(_cx_self* self, _cx_raw raw)
@@ -127,8 +127,9 @@ _cx_memb(_make_heap)(_cx_self* self) {
#if !defined _i_no_clone
STC_DEF _cx_self _cx_memb(_clone)(_cx_self q) {
_cx_self out = _cx_memb(_with_capacity)(q.size);
- for (; out.size < out.capacity; ++out.size, ++q.data)
- out.data[out.size] = i_valfrom(i_valto(q.data));
+ i_valraw r;
+ for (; out.size < out.capacity; ++q.data)
+ r = i_valto(q.data), out.data[out.size++] = i_valfrom(r);
return out;
}
#endif
diff --git a/include/stc/csmap.h b/include/stc/csmap.h
index be1c2ff7..cd25a2c4 100644
--- a/include/stc/csmap.h
+++ b/include/stc/csmap.h
@@ -140,7 +140,7 @@ _cx_memb(_clear)(_cx_self* self)
STC_INLINE _cx_raw
_cx_memb(_value_toraw)(_cx_value* val) {
return _i_SET_ONLY( i_keyto(val) )
- _i_MAP_ONLY( c_make(_cx_raw){i_keyto(&val->first), i_valto(&val->second)} );
+ _i_MAP_ONLY( c_make(_cx_raw){i_keyto((&val->first)), i_valto((&val->second))} );
}
STC_INLINE int
@@ -266,18 +266,18 @@ static _cx_result _cx_memb(_insert_entry_)(_cx_self* self, i_keyraw rkey);
STC_DEF _cx_result
_cx_memb(_insert)(_cx_self* self, i_key key _i_MAP_ONLY(, i_val mapped)) {
- _cx_result res = _cx_memb(_insert_entry_)(self, i_keyto(&key));
+ _cx_result res = _cx_memb(_insert_entry_)(self, i_keyto((&key)));
if (res.inserted) { *_i_keyref(res.ref) = key; _i_MAP_ONLY( res.ref->second = mapped; )}
- else { i_keydrop(&key); _i_MAP_ONLY( i_valdrop((&mapped)); )}
+ else { i_keydrop((&key)); _i_MAP_ONLY( i_valdrop((&mapped)); )}
return res;
}
#if !defined _i_isset
STC_DEF _cx_result
_cx_memb(_insert_or_assign)(_cx_self* self, i_key key, i_val mapped) {
- _cx_result res = _cx_memb(_insert_entry_)(self, i_keyto(&key));
+ _cx_result res = _cx_memb(_insert_entry_)(self, i_keyto((&key)));
if (res.inserted) res.ref->first = key;
- else { i_keydrop(&key); i_valdrop((&res.ref->second)); }
+ else { i_keydrop((&key)); i_valdrop((&res.ref->second)); }
res.ref->second = mapped; return res;
}
@@ -287,7 +287,7 @@ _cx_memb(_insert)(_cx_self* self, i_key key _i_MAP_ONLY(, i_val mapped)) {
_cx_memb(_emplace_or_assign)(_cx_self* self, i_keyraw rkey, i_valraw rmapped) {
_cx_result res = _cx_memb(_insert_entry_)(self, rkey);
if (res.inserted) res.ref->first = i_keyfrom(rkey);
- else i_valdrop((&res.ref->second));
+ else { i_valdrop((&res.ref->second)); }
res.ref->second = i_valfrom(rmapped); return res;
}
#endif
@@ -457,12 +457,12 @@ _cx_memb(_erase_range)(_cx_self* self, _cx_iter it1, _cx_iter it2) {
if (!it2.ref) { while (it1.ref) it1 = _cx_memb(_erase_at)(self, it1);
return it1; }
_cx_key k1 = *_i_keyref(it1.ref), k2 = *_i_keyref(it2.ref);
- _cx_rawkey r1 = i_keyto(&k1);
+ _cx_rawkey r1 = i_keyto((&k1));
for (;;) {
if (memcmp(&k1, &k2, sizeof k1) == 0) return it1;
_cx_memb(_next)(&it1); k1 = *_i_keyref(it1.ref);
_cx_memb(_erase)(self, r1);
- _cx_memb(_find_it)(self, (r1 = i_keyto(&k1)), &it1);
+ _cx_memb(_find_it)(self, (r1 = i_keyto((&k1))), &it1);
}
}
@@ -475,8 +475,10 @@ _cx_memb(_copy)(_cx_self *self, _cx_self other) {
STC_DEF _cx_value
_cx_memb(_value_clone)(_cx_value _val) {
- *_i_keyref(&_val) = i_keyfrom(i_keyto(_i_keyref(&_val)));
- _i_MAP_ONLY( _val.second = i_valfrom(i_valto(&_val.second)); )
+ i_keyraw k = i_keyto(_i_keyref(&_val));
+ *_i_keyref(&_val) = i_keyfrom(k);
+ _i_MAP_ONLY( i_valraw m = i_valto((&_val.second));
+ _val.second = i_valfrom(m); )
return _val;
}
diff --git a/include/stc/cstack.h b/include/stc/cstack.h
index ba01e116..c5d77ed1 100644
--- a/include/stc/cstack.h
+++ b/include/stc/cstack.h
@@ -100,7 +100,9 @@ STC_INLINE _cx_value* _cx_memb(_emplace)(_cx_self* self, _cx_raw raw)
#endif
STC_INLINE _cx_self _cx_memb(_clone)(_cx_self v) {
_cx_self out = {(_cx_value *) c_malloc(v.size*sizeof(_cx_value)), v.size, v.size};
- for (size_t i = 0; i < v.size; ++i, ++v.data) out.data[i] = i_valfrom(i_valto(v.data));
+ i_valraw r;
+ for (size_t i = 0; i < v.size; ++v.data)
+ r = i_valto(v.data), out.data[i++] = i_valfrom(r);
return out;
}
@@ -110,7 +112,8 @@ STC_INLINE void _cx_memb(_copy)(_cx_self *self, _cx_self other) {
}
STC_INLINE i_val _cx_memb(_value_clone)(_cx_value val)
- { return i_valfrom(i_valto(&val)); }
+ { i_valraw r = i_valto((&val)); return i_valfrom(r); }
+
STC_INLINE i_valraw _cx_memb(_value_toraw)(_cx_value* val)
{ return i_valto(val); }
#endif // !_i_no_clone
diff --git a/include/stc/cvec.h b/include/stc/cvec.h
index c523ea45..c7f1a001 100644
--- a/include/stc/cvec.h
+++ b/include/stc/cvec.h
@@ -97,7 +97,7 @@ STC_API _cx_self _cx_memb(_clone)(_cx_self cx);
STC_API _cx_iter _cx_memb(_clone_range_p)(_cx_self* self, _cx_value* pos,
const _cx_value* p1, const _cx_value* p2);
STC_INLINE i_val _cx_memb(_value_clone)(_cx_value val)
- { return i_valfrom(i_valto(&val)); }
+ { i_valraw r = i_valto((&val)); return i_valfrom(r); }
STC_INLINE i_val _cx_memb(_value_fromraw)(i_valraw raw) { return i_valfrom(raw); }
STC_INLINE void _cx_memb(_copy)(_cx_self *self, _cx_self other) {
if (self->data == other.data) return;
@@ -363,7 +363,9 @@ _cx_memb(_clone_range_p)(_cx_self* self, _cx_value* pos,
const _cx_value* p1, const _cx_value* p2) {
pos = _cx_memb(_insert_space_)(self, pos, p2 - p1);
_cx_iter it = {pos};
- for (; p1 != p2; ++p1) *pos++ = i_valfrom(i_valto(p1));
+ i_valraw r;
+ for (; p1 != p2; ++p1)
+ r = i_valto(p1), *pos++ = i_valfrom(r);
return it;
}
#if !defined _i_no_emplace
@@ -372,7 +374,7 @@ _cx_memb(_emplace_range_p)(_cx_self* self, _cx_value* pos,
const _cx_raw* p1, const _cx_raw* p2) {
pos = _cx_memb(_insert_space_)(self, pos, p2 - p1);
_cx_iter it = {pos};
- for (; p1 != p2; ++p1) *pos++ = i_valfrom(*p1);
+ for (; p1 != p2; ++p1) *pos++ = i_valfrom((*p1));
return it;
}
#endif
diff --git a/include/stc/template.h b/include/stc/template.h
index 9d25fd5c..53443308 100644
--- a/include/stc/template.h
+++ b/include/stc/template.h
@@ -103,7 +103,7 @@
#elif defined i_drop && !defined i_key
#define i_valdrop i_drop
#elif defined i_drop
- #error "i_drop not supported when i_key defined. Define i_keydrop instead."
+ #error "i_drop not supported when i_key defined. Define i_keydrop/i_valdrop instead."
#endif
#if defined i_from && !defined i_keyfrom && defined _i_isset
@@ -111,7 +111,7 @@
#elif defined i_from && !defined i_key
#define i_valfrom i_from
#elif defined i_from
- #error "i_from not supported when i_key defined. Define i_keyfrom instead."
+ #error "i_from not supported when i_key defined. Define i_keyfrom/i_valfrom instead."
#endif
#ifdef i_val_str