Y
Hacker News
new
|
ask
|
show
|
jobs
by
wyldfire
261 days ago
std::span<> is another option. Especially when paired with libc++'s hardening mode(s). Apparently, Google has deployed them in production.
2 comments
surajrmal
260 days ago
Hardened std::span just adds checks during operator[] that you would normally only happen in at(). Same for operator* and operator->. It doesn't really have any relevance for the problem the article is written about.
link
loeg
261 days ago
What? std::span is equivalent to just a pointer+length pair. It doesn't know anything about if the underlying object(s) are still valid.
link