How to use template explicit instantiation with C++20 modules?
问题 As explained in this answer template instantiation allows reducing compilation times and sizes by not requiring templates to be recompiled for every new type in every new file that uses them. I'm also excited about how C++20 modules should provide a clean solution to expose templates to external projects and reduce hpp/cpp duplication. What is the syntax that will allow them to work together? For example, I expect modules to look a bit like (untested and therefore likely wrong code because I