STL tutorial and reference guide, second edition: C++ programming with the standard template library
STL tutorial and reference guide, second edition: C++ programming with the standard template library
Teaching template classes with all the advantages
Journal of Computing Sciences in Colleges
Issues in the instantiation of template classes
ACM SIGCSE Bulletin
Hi-index | 0.00 |
C++ programmers who make intensive use of templates for developing applications get poor support from the compilers they use. Typical error reporting associated with template analysis ranges from long, nested, and therefore complex expressions, to short but cryptic messages. This poster introduces a graphical notation that can be used as an intermediate abstract medium on which the result of template analysis can be expressed. The motivation of our approach is to make template analysis and error reporting two orthogonal activities. If compiler implementors adopt a standard notation to express the result of template analysis, tools to help programmers visualize/understand errors can be independently developed, and used as compiler “plug-ins”, which will hopefully have a positive impact on issues such as programmer's productivity and product quality. We have used this notation to manually parse examples taken from the STL, and less known powerful uses of templates, such as expression templates, and template meta-programming. The preliminary stage we are reporting on has helped us to (a) identify elements that are needed in the notation, (b) identify limitations that are due to the instantiation model inherently associated with the language, and (d) have a sense of how useful the notation can be to pinpoint errors associated with the analysis of non-trivial cases such as expression templates.