top | item 42159157

(no title)

carbotaniuman | 1 year ago

I've used vendor-specific C++ compilers with no bounds checking and a barely conforming stdlib, so by your logic C++ has zero bounds checking... Defaults matter!

discuss

order

dataflow|1 year ago

> I've used vendor-specific C++ compilers with no bounds checking and a barely conforming stdlib, so by your logic C++ has zero bounds checking...

I literally said exactly that: "The standard doesn't require any checks to begin with."

> Defaults matter!

Sigh... nobody claimed otherwise. You're really missing the point of the thread.

All I did was give people a tip on how to improve their code security. The exact sentence I wrote was:

>> "If you want bounds checking in your own code, start replacing T* with std::span<T> or std::span<T>::iterator whenever the target is an array."

"BUT DEFAULTS MATTER!!!", you rebut! Well OK, then I guess keep your raw pointers in and don't migrate your code? Sorry I tried to help!

carbotaniuman|1 year ago

Cool, let me know how to improve the code security on my vendor compiler then, I'll be waiting.