Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why does the compiler generate duplicate symbol errors when I use automatic instantiation?

0
Posted

Why does the compiler generate duplicate symbol errors when I use automatic instantiation?

0

This was a limitation in the Version 5.n compilers that has been fixed in the Version 6.n compilers. For more information about Version 5 template limitations, see the discussion of templates in your Version 5.n Using C++ guide. Note also that you cannot do automatic template instantiation if you defined templates and non-templates in the same module. This restriction applies because each time the compiler needs the template implementation, it includes the module that defines it. If that module contains non-template elements, these also are defined, and duplicate symbols can be generated.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.