Skip to content

Commit

Permalink
Fix clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
gregtatcam committed Oct 18, 2024
1 parent e239fcb commit fe6fa60
Showing 1 changed file with 30 additions and 24 deletions.
54 changes: 30 additions & 24 deletions include/xrpl/protocol/TER.h
Original file line number Diff line number Diff line change
Expand Up @@ -484,60 +484,66 @@ class TERSubset
// Only enabled if both arguments return int if TERtiInt is called with them.
template <typename L, typename R>
constexpr auto
operator==(L const& lhs, R const& rhs) -> std::enable_if_t<
std::is_same<decltype(TERtoInt(lhs)), int>::value &&
std::is_same<decltype(TERtoInt(rhs)), int>::value,
bool>
operator==(L const& lhs, R const& rhs)
-> std::enable_if_t<
std::is_same<decltype(TERtoInt(lhs)), int>::value &&
std::is_same<decltype(TERtoInt(rhs)), int>::value,
bool>
{
return TERtoInt(lhs) == TERtoInt(rhs);
}

template <typename L, typename R>
constexpr auto
operator!=(L const& lhs, R const& rhs) -> std::enable_if_t<
std::is_same<decltype(TERtoInt(lhs)), int>::value &&
std::is_same<decltype(TERtoInt(rhs)), int>::value,
bool>
operator!=(L const& lhs, R const& rhs)
-> std::enable_if_t<
std::is_same<decltype(TERtoInt(lhs)), int>::value &&
std::is_same<decltype(TERtoInt(rhs)), int>::value,
bool>
{
return TERtoInt(lhs) != TERtoInt(rhs);
}

template <typename L, typename R>
constexpr auto
operator<(L const& lhs, R const& rhs) -> std::enable_if_t<
std::is_same<decltype(TERtoInt(lhs)), int>::value &&
std::is_same<decltype(TERtoInt(rhs)), int>::value,
bool>
operator<(L const& lhs, R const& rhs)
-> std::enable_if_t<
std::is_same<decltype(TERtoInt(lhs)), int>::value &&
std::is_same<decltype(TERtoInt(rhs)), int>::value,
bool>
{
return TERtoInt(lhs) < TERtoInt(rhs);
}

template <typename L, typename R>
constexpr auto
operator<=(L const& lhs, R const& rhs) -> std::enable_if_t<
std::is_same<decltype(TERtoInt(lhs)), int>::value &&
std::is_same<decltype(TERtoInt(rhs)), int>::value,
bool>
operator<=(L const& lhs, R const& rhs)
-> std::enable_if_t<
std::is_same<decltype(TERtoInt(lhs)), int>::value &&
std::is_same<decltype(TERtoInt(rhs)), int>::value,
bool>
{
return TERtoInt(lhs) <= TERtoInt(rhs);
}

template <typename L, typename R>
constexpr auto
operator>(L const& lhs, R const& rhs) -> std::enable_if_t<
std::is_same<decltype(TERtoInt(lhs)), int>::value &&
std::is_same<decltype(TERtoInt(rhs)), int>::value,
bool>
operator>(L const& lhs, R const& rhs)
-> std::enable_if_t<
std::is_same<decltype(TERtoInt(lhs)), int>::value &&
std::is_same<decltype(TERtoInt(rhs)), int>::value,
bool>
{
return TERtoInt(lhs) > TERtoInt(rhs);
}

template <typename L, typename R>
constexpr auto
operator>=(L const& lhs, R const& rhs) -> std::enable_if_t<
std::is_same<decltype(TERtoInt(lhs)), int>::value &&
std::is_same<decltype(TERtoInt(rhs)), int>::value,
bool>
operator>=(L const& lhs, R const& rhs)
-> std::enable_if_t<
std::is_same<decltype(TERtoInt(lhs)), int>::value &&
std::is_same<decltype(TERtoInt(rhs)), int>::value,
bool>
{
return TERtoInt(lhs) >= TERtoInt(rhs);
}
Expand Down

0 comments on commit fe6fa60

Please sign in to comment.