B Search Erros
Return Home
Newest questions tagged c++ - Stack Overflow

What is the rationale for std::span::operator[] being explicitly undefined for out of bounds access?

Triggered by this question I was reading about out of bounds access via std::span::operator[] here: If idx < size() is false, the behavior is undefined.(until C++26) Why is it specified explicitly to be undefined? With

View original source