开发者

Is there anyway to instead of doing explicit instantiation of a template code for DLL, deliver the code itself somehow implementation-hidden?

开发者 https://www.devze.com 2023-01-25 12:53 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消