You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/04/12 23:58:37 UTC

[GitHub] [incubator-tvm] zhiics commented on a change in pull request #5314: [RUNTIME][IR] Allow non-nullable ObjectRef, introduce Optional.

zhiics commented on a change in pull request #5314: [RUNTIME][IR] Allow non-nullable ObjectRef, introduce Optional<T>.
URL: https://github.com/apache/incubator-tvm/pull/5314#discussion_r407260426
 
 

 ##########
 File path: include/tvm/ir/attrs.h
 ##########
 @@ -85,6 +85,8 @@ namespace tvm {
  */
 template<typename TObjectRef>
 inline TObjectRef NullValue() {
+  static_assert(TObjectRef::_type_is_nullable,
+                "Can only value for nullable types");
 
 Review comment:
   Please rephrase this error message. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services