GNU C++ Renovation Project - Template limitations
Node: Template limitations
Next: Function templates
Up: Templates
Limitations for function and class templates
These limitations apply to any use of templates (function templates or class templates) with gnu C++:
-
Template definitions must be visible
-
When you compile code with templates, the template definitions must come first (before the compiler needs to expand them), and template definitions you use must be visible in the current scope.
-
Individual initializers needed for static data
-
Templates for static data in template classes do not work. See Limitations for class templates.
Next: Function templates
Up: Templates