tqchen commented on code in PR #649:
URL: https://github.com/apache/tvm-ffi/pull/649#discussion_r3626458698
##########
include/tvm/ffi/extra/structural_visit.h:
##########
@@ -138,8 +138,11 @@ struct StructuralVisitorVTable {
*/
class StructuralVisitorObj : public Object {
public:
- /*! \brief Construct the default structural visitor. */
- StructuralVisitorObj() : StructuralVisitorObj(VTable()) {}
+ /*!
+ * \brief Construct a structural visitor from an immutable dispatch vtable.
+ * \param vtable The non-null dispatch table for this visitor. It must
outlive this object.
+ */
+ explicit StructuralVisitorObj(const StructuralVisitorVTable* vtable) :
vtable_(vtable) {}
Review Comment:
we can just have protected consteructor here, no need to have public ones
since subclass fills in the vtable
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]