Remix.run Logo
ghosty141 7 months ago

Wait, why does std::span not do the range checking? We ran into that exact thing at work and were really confused why the hell it doesn't do it currently.

steveklabnik 7 months ago | parent [-]

I believe this is because [] doesn’t do checking normally, so this is seen as a consistency. I am not 100% sure, but I do remember it being a contentious decision.

.at() is added in C++26.