提交 1954540a 创建 作者: David Benjamin's avatar David Benjamin

Make the key_bits multiple assertion a static_assert

May as well have this fire at compile time.
上级 2edf804d
...@@ -9,8 +9,8 @@ template<class CB> ...@@ -9,8 +9,8 @@ template<class CB>
void void
descend(u64 key, markptr<void> *n, u32 level, CB cb) descend(u64 key, markptr<void> *n, u32 level, CB cb)
{ {
// for now, we only support exact multiples of bits_per_level static_assert(key_bits == bits_per_level * radix_levels,
assert(key_bits == bits_per_level * radix_levels); "for now, we only support exact multiples of bits_per_level");
assert(n); assert(n);
void *v = n->ptr(); void *v = n->ptr();
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论