Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1760 +/- ##
==========================================
+ Coverage 63.68% 63.75% +0.07%
==========================================
Files 3 3
Lines 2065 2072 +7
Branches 731 733 +2
==========================================
+ Hits 1315 1321 +6
Misses 162 162
- Partials 588 589 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Hi @dave-365 , Can you rebase on |
ea57fa9 to
d6f95c7
Compare
I did rebase and pushed can you try now. |
|
@KevinEady can you proceed workflow run. |
|
@KevinEady I have did rebased can just approve for workflow run check. |
KevinEady
left a comment
There was a problem hiding this comment.
Mostly documentation issues.
Also: was there a reason SharedArrayBuffer was not included in your changes?
legendecas
left a comment
There was a problem hiding this comment.
I don't think spans shall be used to represent external array buffers. Spans do not represent ownership and an external array buffer means the caller owns the external data.
I'd prefer only keeping the Copy methods for spans.
Hi @KevinEady, Thanks for pointing that out!
|
Fixes #1747
Description
This PR introduces C++20
std::spanoverloads for buffer-like types (Buffer<T>,ArrayBuffer, andTypedArrayOf<T>), allowing developers to pass bounds-carrying handles directly without manually managing separate raw pointers and length parameters:Buffer<T>::New,Buffer<T>::NewOrCopy, andBuffer<T>::Copyoverloads acceptingstd::span.ArrayBuffer::Newoverloads acceptingstd::span..Span()accessors toBuffer<T>,ArrayBuffer, andTypedArrayOf<T>.std::spanAPIs are conditionally compiled under#if defined(__cpp_lib_span).test/buffer.ccandtest/array_buffer.cc.