-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix MSVC build error with container.h #4455
Conversation
include/tvm/runtime/container.h
Outdated
@@ -198,6 +198,7 @@ class ADTObj : public Object, public InplaceArrayBase<ADTObj, ObjectRef> { | |||
} | |||
|
|||
friend class ADT; | |||
template <typename ArrayType, typename ElemType> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider change to InplaceArrayBase<ADTObj, ObjectRef>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Changed it. This compiles clean here (VS 2019 toolset v14.2)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. thanks for the fix!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The PR 4346 introduced a breaking change in MSVC builds.
In container.h, 'non-class template has already been declared as a class template' on line 201.
This change fixes the builds on MSVC (2019 toolset v14.2), but have not tried on any other compiler.