@@ -181,7 +181,7 @@ struct Span {
181
181
*
182
182
* @return A new Span over the first @p Count elements.
183
183
*/
184
- template <std::size_t Count>
184
+ template <std::ptrdiff_t Count>
185
185
Span<T, Count> first () const {
186
186
MBED_ASSERT (Count <= Size);
187
187
return Span<T, Count>(_array);
@@ -194,7 +194,7 @@ struct Span {
194
194
*
195
195
* @return A new Span over the last @p count elements.
196
196
*/
197
- Span<T> last (std::ptrdiff_t count) const {
197
+ Span<T> last (std::size_t count) const {
198
198
MBED_ASSERT (count <= Size);
199
199
return Span<T>(_array + (Size - count), count);
200
200
}
@@ -339,7 +339,7 @@ struct Span<T, SPAN_DYNAMIC_SIZE> {
339
339
*
340
340
* @return A new Span over the first @p count elements.
341
341
*/
342
- Span<T> first (std::ptrdiff_t count) const {
342
+ Span<T> first (std::size_t count) const {
343
343
MBED_ASSERT (count <= _size);
344
344
return Span<T>(_array, count);
345
345
}
@@ -351,7 +351,7 @@ struct Span<T, SPAN_DYNAMIC_SIZE> {
351
351
*
352
352
* @return A new Span over the last @p count elements.
353
353
*/
354
- Span<T> last (std::ptrdiff_t count) const {
354
+ Span<T> last (std::size_t count) const {
355
355
MBED_ASSERT (count <= _size);
356
356
return Span<T>(_array + (_size - count), count);
357
357
}
0 commit comments