HP aC++/HP C Programmer's Guide (B3901-90036; A.06.26; September 2011)

Function Template...................................................................................165
Command-Line Option Instantiation....................................................................166
Compile-Time Instantiation................................................................................166
Why Use Compile-Time Instantiation..............................................................166
Scope.......................................................................................................167
Usage.......................................................................................................167
Migrating from Automatic Instantiation to Compile-time Instantiation.......................167
Possible Duplicate Symbols in Shared Libraries................................................167
Possible Duplicate Symbols in Archive Libraries...............................................168
Building an Archive Library with +inst_auto/+inst_close...............................168
Building an Archive Library with Compile-time Instantiation..........................168
C++ Template Tutorial......................................................................................168
Class Templates..........................................................................................169
Function Templates......................................................................................170
6 Standardizing Your Code.....................................................................................................171
HP aC++ Keywords..............................................................................................171
bool Keyword..................................................................................................171
Usage.......................................................................................................172
Example....................................................................................................172
dynamic_cast Keyword.....................................................................................172
Usage.......................................................................................................172
Example....................................................................................................172
explicit Keyword..............................................................................................175
Usage.......................................................................................................175
Example....................................................................................................176
mutable Keyword.............................................................................................177
Usage.......................................................................................................177
Example....................................................................................................177
namespace and using Keywords........................................................................178
Connections Across Translation Units.............................................................179
An Auxiliary Translation Unit........................................................................180
using- declarations and using- directives.........................................................180
using- declaration...................................................................................180
using- directive.......................................................................................180
typeid Keyword...............................................................................................181
Usage.......................................................................................................181
typeid Example......................................................................................182
volatile Keyword..............................................................................................184
Usage.......................................................................................................184
Example....................................................................................................184
wchar_t Keyword.............................................................................................185
Usage.......................................................................................................185
Example....................................................................................................185
template Keyword............................................................................................185
Contents 13