fix comparison bug introduced in #1320 (#1326)

This commit is contained in:
JinmingHu 2021-01-12 13:25:42 +08:00 committed by GitHub
parent 7d377f5290
commit 320b60806e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -240,21 +240,21 @@ namespace Azure { namespace Core {
inline bool operator<(std::chrono::system_clock::time_point const& tp, DateTime const& dt)
{
return !(dt >= tp);
return (dt > tp);
}
inline bool operator<=(std::chrono::system_clock::time_point const& tp, DateTime const& dt)
{
return !(dt > tp);
return (dt >= tp);
}
inline bool operator>(std::chrono::system_clock::time_point const& tp, DateTime const& dt)
{
return !(dt <= tp);
return (dt < tp);
}
inline bool operator>=(std::chrono::system_clock::time_point const& tp, DateTime const& dt)
{
return !(dt < tp);
return (dt <= tp);
}
}} // namespace Azure::Core