Class templates

Template implementations are hard to maintain because they get compiled into your client's code. Templates also, by their very nature, tend to bloat the resulting object code. This guide provides design standards and conventions to increase code maintainability, and to reduce the memory footprint.

There are many possible designs for template; some are easier to write, while others share more of the implementation details. The best design depends upon the specifics of your code. This guide recommends a standard design, but also gives some alternatives for special circumstances.

Definitions and conventions
Sharing class template implementations
The example class: an owning stack
Sharing the implementation through private inheritance
Sharing the implementation by delegating to a member
Further reading

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker