Add util::span equality comparison
This commit is contained in:
parent
cad2590bc7
commit
c5802b2bbe
1 changed files with 12 additions and 0 deletions
|
|
@ -81,4 +81,16 @@ namespace psemek::util
|
|||
T & operator[] (size_type i) const { return p_begin[i]; }
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
bool operator == (span<T> const & s1, span<T> const & s2)
|
||||
{
|
||||
return (s1.begin() == s2.begin()) && (s1.end() == s2.end());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool operator != (span<T> const & s1, span<T> const & s2)
|
||||
{
|
||||
return !(s1 == s2);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue