-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve usability of spans for outparams. (#7708)
A few changes here: 1) Allow setting the size of a Span (to a value no larger than its current size). This enables use of a Span over a non-const type as an outparam that you fill with data and then set the size of the data. 2) Allow converting a Span<T> to a Span<const T>, so once you fill such a non-const-type Span with data you can pass it to functions expecting a Span over a const type without having to manually create one. 3) Change data_equal to allow comparing Span<T> to Span<const T>.
- Loading branch information
1 parent
ff48fab
commit 1118072
Showing
2 changed files
with
100 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters