Explicit template instantiations

6 views
Skip to first unread message

Volker Braun

unread,
Mar 18, 2014, 11:46:59 PM3/18/14
to pynac...@googlegroups.com
At http://trac.sagemath.org/ticket/14780 we ran into a general issue with pynac in that it uses C++ RTTI which does not work across DSO boundaries. This results in std::bad_cast errors when the dynamic linker ends up picking the template instantiation from outside of libpynac. 

IMHO the best fix is to use explicit instantiation in libpynac. Then you can also declare the templates extern in the code using libpynac, although the latter is probably not require (the dynamic linker will default to the instantiation in libpynac). A patch is at

https://bitbucket.org/vbraun/pynac/commits/af5e2c913c4399459a955b7604547941a36df88e

Do we have a process for reviewing things? I think I can push to the repo, though I'd be happy to hear your input too ;-)

 
Reply all
Reply to author
Forward
0 new messages