HP aC++/HP C A.06.25 Programmer's Guide
Syntax.....................................................................................................................170
Description.............................................................................................................171
Example..................................................................................................................171
Error Directive (#error)................................................................................................171
Syntax.....................................................................................................................171
Example..................................................................................................................171
Warning Directive........................................................................................................172
Syntax.....................................................................................................................172
Trigraph Sequences.....................................................................................................172
Examples......................................................................................................................172
5 Using HP aC++ Templates.......................................................................................................173
Invoking Compile-Time Instantiation..............................................................................173
Scope and Precedence.................................................................................................173
Template Processing....................................................................................................173
Explicit Instantiation...................................................................................................174
Usage......................................................................................................................174
Performance...........................................................................................................174
Examples................................................................................................................175
Class Template..................................................................................................175
Function Template............................................................................................175
Command-Line Option Instantiation..........................................................................176
Compile-Time Instantiation........................................................................................176
Why Use Compile-Time Instantiation...................................................................177
Scope......................................................................................................................177
Usage......................................................................................................................177
Migrating from Automatic Instantiation to Compile-time Instantiation....................177
Possible Duplicate Symbols in Shared Libraries....................................................177
Possible Duplicate Symbols in Archive Libraries..................................................178
Building an Archive Library with +inst_auto/+inst_close................................178
Building an Archive Library with Compile-time Instantiation........................178
C++ Template Tutorial.................................................................................................179
Class Templates......................................................................................................179
Function Templates................................................................................................180
6 Standardizing Your Code........................................................................................................181
HP aC++ Keywords...........................................................................................................181
bool Keyword..............................................................................................................181
Usage......................................................................................................................181
Example..................................................................................................................182
dynamic_cast Keyword...............................................................................................182
Usage......................................................................................................................182
Example..................................................................................................................182
Table of Contents 13