Browse Source

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

GitOrigin-RevId: 638683a5f7
tags/v1.0.0-rc1
Megvii Engine Team 4 years ago
parent
commit
989f3e6256
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      imperative/python/src/pyext17.h

+ 2
- 2
imperative/python/src/pyext17.h View File

@@ -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;


Loading…
Cancel
Save