martinus / robin-hood-hashing

Fast & memory efficient hashtable based on robin hood hashing for C++11/14/17/20
https://gitter.im/martinus/robin-hood-hashing
MIT License
1.5k stars 142 forks source link

Explicit template instantiation #168

Open KTRosenberg opened 1 year ago

KTRosenberg commented 1 year ago

I’m trying to reduce the compiletime of my project by explicitly instantiating templates, but am finding it challenging to figure out how to get explicit instantiation for robin_hood unordered node map / flat map to compile. For an example, I am going for <unsigned int, std::vector>.

I’ve been successful before when it comes to getting explicit template instantiation working, but I believe robin_hood is somehow more complex and the compiler messages are quite vague.

Would you please advise on how to do explicit instantiation (extern template) in this case? I know it is probably going to use robon_hood::Table.

Thank you.