junrushao1994 commented on a change in pull request #5687:
URL: https://github.com/apache/incubator-tvm/pull/5687#discussion_r434037129



##########
File path: include/tvm/runtime/container.h
##########
@@ -1151,6 +1151,42 @@ class String : public ObjectRef {
    */
   inline String operator=(std::string other);
 
+  /*!
+   * \brief Compare is less than other std::string
+   *
+   * \param other The other string
+   *
+   * \return the comparison result
+   */
+  bool operator<(const std::string& other) const { return this->compare(other) 
< 0; }

Review comment:
       This was a missing part that can potentially cause mysterious bugs, 
because < was inherited from ObjectRef which was pointer comparison instead.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to