Comment Re:Missing features (Score 1) 286
So, memcpy() does not work in C++? Did not know that.
Or strcpy() for that matter? Ah: you want to imply that one should use std::string?
Sorry, regarding buffer overruns C++ is as vulnerable as C.
memcpy() and strcpy() are not found in proper C++ programs (there is no need for them).
Anyway, memcpy is not the cause for buffer overruns. Buffer overruns appear when two pieces of code get confused about what is the actual size of the buffer. In C++, the actual size is stored right there inside the buffer object (e.g. std::vector or std::string), so the probability of confusion is greatly reduced.
strcpy() is vulnerable because it relies on the buffer size stored somewhere else in addition to the buffer management (i.e. malloc()), and these two locations may get inconsistent and cause confusion and bugs. Luckily, there is about zero reason to use strcpy() in C++.
Of course one can compile what is basically C code by a C++ compiler, but this does not mean one could not do better in C++, or that C++ is somehow tainted by allowing C code. One can write buggy code in any language, writing buggy C code in C++ is just one easy way to do that.