[Improvement] make expression for template argument a constexpr (#10268)

This commit is contained in:
Gabriel
2022-06-21 07:42:02 +08:00
committed by GitHub
parent dd39287a0a
commit f5e5880fb6

View File

@ -86,7 +86,7 @@ public:
void insert(const void* data) override {
if (data == nullptr) return;
if (sizeof(T) >= 16) {
if constexpr (sizeof(T) >= 16) {
// for largeint, it will core dump with no memcpy
T value;
memcpy(&value, data, sizeof(T));