Commit b9baf19
Document the differing trimming behavior of absl::Span::subspan() and std::span::subspan()
`std::span::subspan()` has stricter preconditions than its `absl::`
counterpart. Supplying a `len` that would extend beyond the end of the
span is undefined behavior for `std::span` (unless `len` is the default
`npos` value), whereas `absl::span` simply truncates the result.
PiperOrigin-RevId: 836331418
Change-Id: I0e9a11cb434deca0b88d761e8233a44d5a9273ce1 parent f33b7c0 commit b9baf19
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| |||
449 | 452 | | |
450 | 453 | | |
451 | 454 | | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
452 | 460 | | |
453 | 461 | | |
454 | 462 | | |
| |||
0 commit comments