replica/logstor: declare hist_key specialization before use

Declare the hist_key<segment_descriptor> specialization in compaction.hh
before templates in that header can instantiate the primary template.

This avoids conflicting primary-template instantiations when the header is
seen through the PCH.
This commit is contained in:
Yaniv Michael Kaul
2026-04-17 11:45:09 +03:00
parent faa2f8ba76
commit e7dbccbdcd

View File

@@ -69,6 +69,13 @@ struct segment_descriptor : public log_heap_hook<segment_descriptor_hist_options
}
};
} // namespace replica::logstor
template<>
size_t hist_key<replica::logstor::segment_descriptor>(const replica::logstor::segment_descriptor& desc);
namespace replica::logstor {
using segment_descriptor_hist = log_heap<segment_descriptor, segment_descriptor_hist_options>;
struct segment_set {