However, your code is full of vector accesses without bounds checking: vec[i] instead of vec.at(i).
That's just as "unsafe" as C, so I recommend not bragging about how far you've come.
Your code is full of what is essentially unprotected C-style
*(addr + i) = ...
... = *(addr + i)
You've been writing C++ since the 1980's, but your code is full of raw pointer math, and yet... "No worries about memory safety"?I have a feeling you'll be reaching for Valgrind or address sanitizer someday soon, just like the C programmers.