提交 989f3e62 编写于 作者: M Megvii Engine Team

chore(mge/imperative): workaround a gcc-7 bug

GitOrigin-RevId: 638683a5f7a9b333676110b6beb8f30e28117d10
上级 d4bad711
......@@ -264,8 +264,8 @@ public:
TypeBuilder& operator=(const TypeBuilder&) = delete;
TypeBuilder() : m_type{PyVarObject_HEAD_INIT(nullptr, 0)} {
// static_assert(HAS_MEMBER(T, tp_name));
if constexpr (HAS_MEMBER(T, tp_name)) {
constexpr auto has_tp_name = HAS_MEMBER(T, tp_name);
if constexpr (has_tp_name) {
m_type.tp_name = T::tp_name;
}
m_type.tp_dealloc = tp_dealloc::value;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册