summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/new_vec.c
diff options
context:
space:
mode:
authorTyge Lovset <[email protected]>2023-03-31 22:08:07 +0200
committerTyge Lovset <[email protected]>2023-03-31 22:08:07 +0200
commit5693ae9ae0d1a18627ba540e0240da010b282296 (patch)
treeccb0dbe519d9a27fc944446ecc1a574cd9d86fcc /misc/examples/new_vec.c
parent56c394ede691143a32d53f4094df37dc49dc0a29 (diff)
downloadSTC-modified-5693ae9ae0d1a18627ba540e0240da010b282296.tar.gz
STC-modified-5693ae9ae0d1a18627ba540e0240da010b282296.zip
Added stc/extend.h: A generalized way to type-safely extend a container with new members which can be accessed from the template parameters. See examples/functor.c
Diffstat (limited to 'misc/examples/new_vec.c')
-rw-r--r--misc/examples/new_vec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/examples/new_vec.c b/misc/examples/new_vec.c
index 988b78d9..df443b7f 100644
--- a/misc/examples/new_vec.c
+++ b/misc/examples/new_vec.c
@@ -10,7 +10,7 @@ struct MyStruct {
} typedef MyStruct;
#define i_val int
-#define i_opt c_is_forward
+#define i_is_forward
#define i_tag i32
#include <stc/cvec.h>
@@ -18,7 +18,7 @@ typedef struct Point { int x, y; } Point;
#define i_val Point
#define i_less(a, b) a->x < b->x || (a->x == b->x && a->y < b->y)
-#define i_opt c_is_forward
+#define i_is_forward
#define i_tag pnt
#include <stc/cvec.h>