mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 13:51:33 -06:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user