p_insert -= sizeof(node_offset_t);
node_offset_t back_offset = (p_insert - p_insert_front);
mut.copy_in_absolute(p_insert, back_offset);
- ns_oid_view_t::append<KT>(mut, key, p_insert);
+ ns_oid_view_t::append(mut, key, p_insert);
return {p_insert_front, p_insert};
}
{
p_append -= sizeof(node_offset_t);
p_offset_while_open = p_append;
- ns_oid_view_t::append<KT>(*p_mut, key, p_append);
+ ns_oid_view_t::append(*p_mut, key, p_append);
return {p_mut, p_append};
}
oid.reset_to(origin_base, new_base, node_size);
}
- template <KeyT KT>
- static node_offset_t estimate_size(const full_key_t<KT>& key);
+ template <typename Key>
+ static node_offset_t estimate_size(const Key& key);
- template <KeyT KT>
+ template <typename Key>
static void append(NodeExtentMutable&,
- const full_key_t<KT>& key,
+ const Key& key,
char*& p_append);
static void append(NodeExtentMutable& mut,
}
}
- template <KeyT KT>
- static void test_append(const full_key_t<KT>& key, char*& p_append);
+ template <typename Key>
+ static void test_append(const Key& key, char*& p_append);
string_key_view_t nspace;
string_key_view_t oid;
return lhs <=> rhs == 0;
}
-template <KeyT KT>
-node_offset_t ns_oid_view_t::estimate_size(const full_key_t<KT>& key) {
- if constexpr (KT == KeyT::VIEW) {
+template <typename Key>
+node_offset_t ns_oid_view_t::estimate_size(const Key& key) {
+ static_assert(IsFullKey<Key>);
+ if constexpr (std::same_as<Key, key_view_t>) {
return key.ns_oid_view().size();
} else {
if (key.dedup_type() != Type::STR) {
}
}
-template <KeyT KT>
+template <typename Key>
void ns_oid_view_t::append(
- NodeExtentMutable& mut, const full_key_t<KT>& key, char*& p_append) {
+ NodeExtentMutable& mut, const Key& key, char*& p_append) {
+ static_assert(IsFullKey<Key>);
if (key.dedup_type() == Type::STR) {
string_key_view_t::append_str(mut, key.nspace(), p_append);
string_key_view_t::append_str(mut, key.oid(), p_append);
}
}
-template <KeyT KT>
-void ns_oid_view_t::test_append(const full_key_t<KT>& key, char*& p_append) {
+template <typename Key>
+void ns_oid_view_t::test_append(const Key& key, char*& p_append) {
+ static_assert(IsFullKey<Key>);
if (key.dedup_type() == Type::STR) {
string_key_view_t::test_append_str(key.nspace(), p_append);
string_key_view_t::test_append_str(key.oid(), p_append);