tqchen commented on a change in pull request #9748:
URL: https://github.com/apache/tvm/pull/9748#discussion_r808161589
##########
File path: include/tvm/runtime/container/optional.h
##########
@@ -93,6 +93,11 @@ class Optional : public ObjectRef {
ICHECK(data_ != nullptr);
return T(data_);
}
+ /*!
+ * \return The internal object pointer with container type of T.
+ * \note This function do not perform not-null checking.
+ */
+ const ContainerType* get() const { return
static_cast<ContainerType*>(data_.get()); }
Review comment:
Indeed, I didn't noticed that ObjectRef also have a get method. I think
this sounds good to me then. Perhaps we can just add additional comments about
the behavior
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]