Merge topic 'cm-optional-warning'

b7d4ee23d8 cm::optional: Fix `-Wunused-parameter` warnings in comparison operators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !5739
This commit is contained in:
Brad King
2021-01-26 14:08:34 +00:00
committed by Kitware Robot

View File

@@ -313,7 +313,7 @@ bool operator!=(const optional<T>& opt, nullopt_t) noexcept
}
template <typename T>
bool operator<(const optional<T>& opt, nullopt_t) noexcept
bool operator<(const optional<T>& /*opt*/, nullopt_t) noexcept
{
return false;
}
@@ -331,7 +331,7 @@ bool operator>(const optional<T>& opt, nullopt_t) noexcept
}
template <typename T>
bool operator>=(const optional<T>& opt, nullopt_t) noexcept
bool operator>=(const optional<T>& /*opt*/, nullopt_t) noexcept
{
return true;
}
@@ -355,13 +355,13 @@ bool operator<(nullopt_t, const optional<T>& opt) noexcept
}
template <typename T>
bool operator<=(nullopt_t, const optional<T>& opt) noexcept
bool operator<=(nullopt_t, const optional<T>& /*opt*/) noexcept
{
return true;
}
template <typename T>
bool operator>(nullopt_t, const optional<T>& opt) noexcept
bool operator>(nullopt_t, const optional<T>& /*opt*/) noexcept
{
return false;
}