R2Northstar / NorthstarLauncher

Launcher used to modify Titanfall 2 to allow mods to be loaded
MIT License
271 stars 125 forks source link

Don't instantiate templates before declaration, add missing instantiation #706

Closed Jan200101 closed 1 month ago

Jan200101 commented 1 month ago

In C++ explicit template instantiations need to be done AFTER template declarations are made.

Does not work:

template class SquirrelManager<ScriptContext::SERVER>;
template <ScriptContext context> class SquirrelManager;

Works:

template <ScriptContext context> class SquirrelManager;
template class SquirrelManager<ScriptContext::SERVER>;