3 ms·
> 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
by dataflow 2y 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 2y agoCool, let me know how to improve the code security on my vendor compiler then, I'll be waiting.
- dataflow 2y ago> Cool, let me know how to improve the code security on my vendor compiler then, I'll be waiting. Switch to std::span and add 1 line to std::span::operator[] to check your bounds...
- carbotaniuman 2y agoI don't think std::span is bounds checked. Try again.
- dataflow 2y ago> I don't think std::span is bounds checked. Try again. That's why I said add 1 line to std::span::operator[] to check your bounds. I'm telling you to modify the STL header. It's a text file. Add 1 line to make it bounds-checked.