clang编译失败,但不是g ++
/Users/xx/xxx/xxxx/common/src/memorychunkpn.hpp:438:28: error: constexpr variable 'nOff' must be initialized by a constant expression
constexpr auto nOff = (size_t)(uintptr_t)(&((*((InnMemoryChunk *)(0))).Data[0]));
InnMemoryChunk
:
typedef struct _InnMemoryChunk{
bool In; // this to indicate the chunk is allocated in the memory pool
// actually we can compare pointer range to decide
size_t NodeID; // node in its memory pool, use it for offset calculation
size_t PoolID; //
size_t BranchID; //
uint8_t Data[4]; // offset to the data field, size is always ok
}InnMemoryChunk;
有人可以帮忙吗?