Next: 17 Standard Template Library (STL)  Up: index  Previous: 15 Structures, Unions and Enumerations  Contents

16 Templates

16.1

High Integrity CPP Rule

Avoid implicit conversions from class templates to non-dependent types as this ensures that clients cannot bypass the class interface.

16.2

High Integrity CPP Rule

Do not define a class template with potentially conflicting methods.

16.3

High Integrity CPP Rule

Only instantiate templates with template arguments which fulfill the interface requirements of the 'template'.

16.4

High Integrity CPP Guideline

Only use templates when the behaviour of the class or function template is completely independent of the type of object to which it is applied.


HICPP VERSION 2.4  http://www.codingstandard.com   Copyright: © 2007 THE PROGRAMMING RESEARCH GROUP