Files
2026-07-13 12:47:42 +08:00

14 lines
545 B
Diff

diff --git a/src/sparsehash/internal/hashtable-common.h b/src/sparsehash/internal/hashtable-common.h
index bac2b88..59c752c 100644
--- a/src/sparsehash/internal/hashtable-common.h
+++ b/src/sparsehash/internal/hashtable-common.h
@@ -51,7 +51,7 @@ _START_GOOGLE_NAMESPACE_
template <bool> struct SparsehashCompileAssert { };
#define SPARSEHASH_COMPILE_ASSERT(expr, msg) \
- __attribute__((unused)) typedef SparsehashCompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]
+ static_assert(bool(expr), #msg)
namespace sparsehash_internal {