Don't use static_assert(!sizeof(T*))
diff --git a/src/ir/module-splitting.cpp b/src/ir/module-splitting.cpp index 0c02c1f..d4eb1bd 100644 --- a/src/ir/module-splitting.cpp +++ b/src/ir/module-splitting.cpp
@@ -348,10 +348,10 @@ return tags; } else if constexpr (std::is_same_v<T, DataSegment>) { return dataSegments; - } else if constexpr (std::is_same_v<T, ElementSegment>) { - return elementSegments; } else { - static_assert(!sizeof(T*), "Unsupported module item type"); + static_assert(std::is_same_v<T, ElementSegment>, + "Unsupported module item type"); + return elementSegments; } }