message: Make comparison operators on Timestamp comply with general principles
diff: @@ -119,11 +119,6 @@ public:
  return std::chrono::time_point<C, D>(duration);
  }
  - // Note that only == and != operators work if one of the Timestamps are null! Else use realm::Greater,
  - // realm::Less, etc, instead. This is in order to collect all treatment of null behaviour in a single place for all
  - // types (query_conditions.hpp) to ensure that all types sort and compare null vs. non-null in the same manner,
  - // especially for int/float where we cannot override operators. This design is open for discussion, though,
  - // because it has usability drawbacks
  bool operator==(const Timestamp& rhs) const
  {
  if (is_null() && rhs.is_null())
  @@ -140,26 +135,42 @@ public:
  }
  bool operator>(const Timestamp& rhs) const
  {
  - REALM_ASSERT(!is_null());
  - REALM_ASSERT(!rhs.is_null());
  + if (is_null()) {
  + return false;
  + }
  + if (rhs.is_null()) {
  + return true;
  + }
  return (m_seconds > rhs.m_seconds) || (m_seconds == rhs.m_seconds && m_nanoseconds > rhs.m_nanoseconds);
  }
  bool operator<(const Timestamp& rhs) const
  {
  - REALM_ASSERT(!is_null());
  - REALM_ASSERT(!rhs.is_null());
  + if (rhs.is_null()) {
  + return false;
  + }
  + if (is_null()) {
  + return true;
  + }
  return (m_seconds < rhs.m_seconds) || (m_seconds == rhs.m_seconds && m_nanoseconds < rhs.m_nanoseconds);
  }
  bool operator<=(const Timestamp& rhs) const
  {
  - REALM_ASSERT(!is_null());
  - REALM_ASSERT(!rhs.is_null());
  + if (is_null()) {
  + return true;
  + }
  + if (rhs.is_null()) {
  + return false;
  + }
  return *this < rhs || *this == rhs;
  }
  bool operator>=(const Timestamp& rhs) const
  {
  - REALM_ASSERT(!is_null());
  - REALM_ASSERT(!rhs.is_null());
  + if (rhs.is_null()) {
  + return true;
  + }
  + if (is_null()) {
  + return false;
  + }
  return *this > rhs || *this == rhs;
  }
  Timestamp& operator=(const Timestamp& rhs) = default;
  