Skip to content

Commit

Permalink
Fix deprecation warnings with GCC for pair<T1,void> comparison operators
Browse files Browse the repository at this point in the history
Co-Authored-By: Andrey Prokopenko <prokopenkoav@ornl.gov>
  • Loading branch information
dalg24 and aprokop committed May 3, 2024
1 parent 69567f3 commit 9c79202
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions core/src/Kokkos_Pair.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,37 +450,37 @@ struct KOKKOS_DEPRECATED pair<T1, void> {
//

template <class T1>
KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator==(
KOKKOS_DEPRECATED KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator==(
const pair<T1, void>& lhs, const pair<T1, void>& rhs) {
return lhs.first == rhs.first;
}

template <class T1>
KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator!=(
KOKKOS_DEPRECATED KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator!=(
const pair<T1, void>& lhs, const pair<T1, void>& rhs) {
return !(lhs == rhs);
}

template <class T1>
KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator<(
KOKKOS_DEPRECATED KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator<(
const pair<T1, void>& lhs, const pair<T1, void>& rhs) {
return lhs.first < rhs.first;
}

template <class T1>
KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator<=(
KOKKOS_DEPRECATED KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator<=(
const pair<T1, void>& lhs, const pair<T1, void>& rhs) {
return !(rhs < lhs);
}

template <class T1>
KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator>(
KOKKOS_DEPRECATED KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator>(
const pair<T1, void>& lhs, const pair<T1, void>& rhs) {
return rhs < lhs;
}

template <class T1>
KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator>=(
KOKKOS_DEPRECATED KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator>=(
const pair<T1, void>& lhs, const pair<T1, void>& rhs) {
return !(lhs < rhs);
}
Expand Down

0 comments on commit 9c79202

Please sign in to comment.