Is there a way to cope with undefined reference error for template functions without implementing them in header?

笑着哭i 提交于 2019-12-02 05:55:36

Marshall Cline's C++-FAQ already deals with this.

One way is to use export but I don't really recommend using it because not all compilers support it really!

In fact C++0x Committee has voted out export out of the next C++ Standard.

If you know in advance which all instantiations you will need, you can instantiate them manually.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!