[PR #6925] Replace gsl::at with a new til::at(span) for pre-checked bounds #26822

Open
opened 2026-01-31 09:18:20 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/6925

State: closed
Merged: Yes


The recent changes to use gsl::span everywhere added a few bounds checks
along codepaths where we were already checking bounds. Some of them may
be non-obvious to the optimizer, so we can now use til::at to help them
along.

To accomplish this, I've added a new overload of til::at that takes a
span and directly accesses its backing buffer.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/6925 **State:** closed **Merged:** Yes --- The recent changes to use gsl::span everywhere added a few bounds checks along codepaths where we were already checking bounds. Some of them may be non-obvious to the optimizer, so we can now use til::at to help them along. To accomplish this, I've added a new overload of til::at that takes a span and directly accesses its backing buffer.
claunia added the pull-request label 2026-01-31 09:18:20 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26822