HP aC++/HP C A.06.25 Programmer's Guide
6 Standardizing Your Code
HP aC++ largely conforms to the ISO/IEC 14882 Standard for the C++ Programming
Language (the international standard for C++). This chapter discusses the following
topics:
• “HP aC++ Keywords” (page 181)
• “Overloading new[] and delete[] for Arrays” (page 197)
• “Standard Exception Classes” (page 198)
• “Exceptions Thrown by the Standard C++ Library” (page 200)
• “type_info Class” (page 200)
• “Unsupported Functionality” (page 201)
HP aC++ Keywords
HP aC++ supports the following list of keywords. Keywords cannot be abbreviated
and must always be entered in lowercase letters.
Table 6-1 HP aC++ Keywords
• static_cast
• template
• this
• throw
• true
• try
• typeid
• typename
• using
• virtual
• volatile (also an ANSI C
keyword)
• wchar_t
• xor
• xor_eq
• friend
• inline
• mutable
• namespace
• new
• not
• not_eq
• operator
• or
• or_eq
• private
• protected
• public
• reinterpret_cast
• and
• and_eq
• bitand
• bitor
• bool
• catch
• class
• compl
• const (also an ANSI C
keyword)
• const_cast
• delete
• dynamic_cast
• explicit
• false
bool Keyword
The keyword bool represents a data type. Variables and expressions of type bool can
have a value of either true or false. The value of true equals 1. The value of false
equals 0.
Usage
The ANSI/ISO C++ International Standard states that values of type bool are either
true or false. There are no signed, unsigned, short, or long bool types or values.
HP aC++ Keywords 181