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

This commit is contained in:
Brad King
2021-01-25 14:44:09 -05:00
parent 4f9228a300
commit b7d4ee23d8

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;
}