Vec<T> works!!!!!!!!!!

This commit is contained in:
2025-05-12 21:37:13 +03:00
parent 8be9917349
commit a45b7cbb21
146 changed files with 446 additions and 7030 deletions

View File

@@ -6,10 +6,10 @@ clean:
rm -rf test *.o compile_commands.json
test: test.o
cc -o $@ $^ -L../build -l:libc+.a # -nostdlib++ -lsupc++
cc -o $@ $^ -L../build -l:libc+.a -ggdb # -nostdlib++ -lsupc++
%.o: %.cpp
cc -c -o $@ $< -std=c++23 -I../src/include # -nostdinc++
cc -c -o $@ $< -std=c++23 -I../src/include -ggdb # -nostdinc++
../build/libc+:
$(MAKE) -C ../

BIN
test/test

Binary file not shown.

View File

@@ -1,7 +1,13 @@
#include <type_traits>
#include <collections/vec.hpp>
#include <stddef.h>
#include <stdio.h>
int main(int argc, char* argv[]) {
std
Vec<size_t>* v = new Vec<size_t>();
v->push(69);
v->push(420);
size_t ft = v->pop().unwrap();
size_t sn = v->pop().unwrap();
printf("ft: %zu sn: %zu\n", ft, sn);
return 0;
}
}