Skip to content

Commit eba1dc6

Browse files
committed
Span: Improve comparison operator to array by using fixed size Span.
1 parent 7f195b8 commit eba1dc6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

platform/Span.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ bool operator!=(const Span<T, LhsSize>& lhs, const Span<U, RhsSize>& rhs)
441441
template<typename T, ptrdiff_t LhsSize, ptrdiff_t RhsSize>
442442
bool operator!=(const Span<T, LhsSize>& lhs, T (&rhs)[RhsSize])
443443
{
444-
return !(lhs == Span<T>(rhs));
444+
return !(lhs == Span<T, RhsSize>(rhs));
445445
}
446446

447447
/**
@@ -456,7 +456,7 @@ bool operator!=(const Span<T, LhsSize>& lhs, T (&rhs)[RhsSize])
456456
template<typename T, ptrdiff_t LhsSize, ptrdiff_t RhsSize>
457457
bool operator!=(T (& lhs)[LhsSize], const Span<T, RhsSize>& rhs)
458458
{
459-
return !(Span<T>(lhs) == rhs);
459+
return !(Span<T, LhsSize>(lhs) == rhs);
460460
}
461461

462462
/**

0 commit comments

Comments
 (0)