summaryrefslogtreecommitdiffhomepage
path: root/examples/complex.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-01-03 10:50:41 +0100
committerTyge Løvset <[email protected]>2021-01-03 10:50:41 +0100
commite4c1dadb85e08d88fbc706e49a5d2b18b39fe0ed (patch)
tree731d91462d450fb848dd9125efdc8dc77c68d730 /examples/complex.c
parent949c6b61cae7bb4665f47a6f27375dd450a23854 (diff)
downloadSTC-modified-e4c1dadb85e08d88fbc706e49a5d2b18b39fe0ed.tar.gz
STC-modified-e4c1dadb85e08d88fbc706e49a5d2b18b39fe0ed.zip
Force template argument *clone* to be specified when *del* is specified for containers. Can be *c_no_clone* if clonable is not required.
Diffstat (limited to 'examples/complex.c')
-rw-r--r--examples/complex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/complex.c b/examples/complex.c
index 6f665208..16aa75b7 100644
--- a/examples/complex.c
+++ b/examples/complex.c
@@ -5,8 +5,8 @@
void check_del(float* v) {printf("destroy %g\n", *v);}
-using_carray(f, float, check_del, c_default_clone); // normally omit the last argument - float type need no destroy.
-using_clist(a, carray2f, c_no_compare, carray2f_del);
+using_carray(f, float, check_del, c_default_clone); // normally omit the last 2 arguments - float type need no destroy.
+using_clist(a, carray2f, c_no_compare, carray2f_del, carray2f_clone);
using_cmap(l, int, clist_a, clist_a_del, clist_a_clone);
using_cmap_strkey(s, cmap_l, cmap_l_del, cmap_l_clone);