Vec<T> works!!!!!!!!!!
This commit is contained in:
@@ -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 ../
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user