Y
Hacker News
new
|
ask
|
show
|
jobs
by
WalterBright
2757 days ago
C++'s array bounds checking is there only if you use vector<>, not regular arrays.
1 comments
kllrnohj
2757 days ago
And D's bounds checking is only there if you don't use pointers or @trusted.
fyi std::array also has bounds checking, you're not limited to vector<> to have that.
link
WalterBright
2757 days ago
D will give you compilation errors in @safe mode if you try to index off of a pointer.
link
fyi std::array also has bounds checking, you're not limited to vector<> to have that.