Is there anyway to instead of doing explicit instantiation of a template code for DLL, deliver the code itself somehow implementation-hidden?
If a template code is about to be used for DLL the explicit instantiation should be applied to produce the binary but I want to know Is there anyway not to开发者_运维问答 do explicit instantiation but to deliver the source-code somehow implementation-hidden to the end-user so that his/her compiler can does the instantiation itself ?
That's what the export
keyword was invented for. Sadly, almost no compiler ever implemented it, and AFAIK, it will be deprecated in C++1x.
精彩评论