Skip to content
Snippets Groups Projects
Unverified Commit 3a30fc89 authored by Jayesh Badwaik's avatar Jayesh Badwaik
Browse files

- nola::static_array : define the comparison operator

parent 8f6bb484
Branches
No related tags found
No related merge requests found
......@@ -77,6 +77,18 @@ constexpr auto to_static_array(Args&&... args) -> nola::static_array<T, sizeof..
return {{std::forward<Args>(args)...}};
}
template <typename T, std::size_t N>
NOLA_HOST_DEVICE
constexpr auto operator==(static_array<T, N> const& a, static_array<T, N> const& b) -> bool
{
for (std::size_t i = 0; i < N; ++i) {
if (a[i] != b[i]) {
return false;
}
}
return true;
}
// -------------------------------------------------------------------------------------------------
// Implementation
// -------------------------------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment