Those of us using modern C++ do not ship memory usage faults, and have not done for years. So, experience with C and pre-modern C++ does not generalize.
Those of us using modern C++ do not ship memory usage faults, and have not done for years. So, experience with C and pre-modern C++ does not generalize.
If not, then "modern C++" is still not memory-safe.
The same applies to, e.g., Rust: any Rust program may use unsafe blocks. That Rust programs may contain unsafe blocks does not make Rust implicitly unsafe. Even using unsafe blocks does not, by itself, make the program unsafe.
> Even using unsafe blocks does not, by itself, make the program unsafe.
This is false. "Unsafe" means that there is the potential to cause memory safety bugs. Unsafe blocks and C++ cause this, by definition. "Unsafe" does not mean that a memory safety bug actually exists.
Moreover, I didn't mention anything about Rust in my comment.
If you are coding C or pre-modern C++, then you are not coding modern C++, regardless of the compiler you happen to build with.
Your claim that modern C++ doesn't ship memory safety issues is a fallacy not worth my time for a rebuttal.
Instead, mid-90s C++, with all the leaks, is valid C++, 20 or otherwise.
No true C++20 program is memory unsafe... unless you use a normal pointer, which is always available and will bork you just as hard as in C.
Your argument applies equally well to Rust: any Rust program may include unsafe blocks. That any program may contain unsafe blocks does not make Rust implicitly unsafe. That a Rust program does (transitively) contain unsafe blocks does not make it an unsafe program. All substantial Rust programs at least transitively contain unsafe blocks.
Thus, your argument is invalid.