Skip to content

Commit

Permalink
Make RecordRef weakly-equality-comparable
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed Aug 10, 2023
1 parent aec5c80 commit 61356f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/llama/RecordRef.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,13 +574,13 @@ namespace llama
template<typename T>
LLAMA_FN_HOST_ACC_INLINE friend auto operator!=(const RecordRef& vd, const T& t) -> bool
{
return internal::recordRefRelOperator<std::not_equal_to<>>(vd, t);
return !(vd == t);
}

template<typename T, typename = std::enable_if_t<!isRecordRef<T>>>
LLAMA_FN_HOST_ACC_INLINE friend auto operator!=(const T& t, const RecordRef& vd) -> bool
{
return vd != t;
return !(t == vd);
}

template<typename T>
Expand Down

0 comments on commit 61356f7

Please sign in to comment.