template compiler complication still exist ?

COMPILER COMPLICATIONS
Many compilers do not allow separate compilation of templates, so you may need to include your
template definition with your code that uses it. As usual, at least the function declaration must
precede any use of the function template.
Some C++ compilers have additional special requirements for using templates. If you have trouble
compiling your templates, check your manuals or check with a local expert. You may need to set spe-
cial options or rearrange the way you order the template definitions and the other items in your files.
The template program layout that seems to work with the widest selection of compilers is the fol-
lowing: Place the template definition in the same file in which it is used and have the template
definition precede all uses (all invocations) of the template. If you want to place your function
template definition in a file separate from your application program, you can #include the file
with the function template definition in the application file.



If you guy know exactly what compiler allows this plz reply here.Thanks.
It looks like Comeau would be your best bet if you want to use the export keyword for separate template compilation.

However, if you want your template code to work across all (standards-compliant) compilers, then you should use the inclusion or separation model based on your needs.

Here is an explanation of the inclusion and separation model for compilation of code using templates:

http://www.cplusplus.com/forum/beginner/52650/
Topic archived. No new replies allowed.