Whats the export keyword about? Why do I get a link error when compiling my templates?
Although Standard C++ has no such requirement, some compilers require that all function templates need to be made available in every translation unit that it is used in. In effect, for those compilers, the bodies of template functions must be made available in a header file. To repeat: that means those compilers won’t allow them to be defined in non-header files such as .cpp files. To clarify, in C++ese this means that this: // ORIGINAL version of xyz.h template
Related Questions
- Can I export individual or bulk bibliographic record into my favorite reference manager? Why do I get an error when I click Export on an article?
- Using the browser Back button after following a link in the search-results page results in a "Page Expired" error. What should I do?
- Whats the export keyword about? Why do I get a link error when compiling my templates?