Index , -see comma operator ->* -see pointer to member ! -see logical negation operator operator . -see class member access != -see inequality operator operator # operator 16-8 .* -see pointer to member ## operator 16-8 operator % -see modulus operator ... -see ellipsis %= operator 5-26 / -see division operator & /* */ comment 2-5 -see address-of operator // comment 2-5 -see bitwise AND operator /= operator 5-26 reference declarator 8-7 : && -see logical AND operator field declaration 9-14 &= operator 5-26 label specifier 6-1 () :: -see function call -see scope resolution operator operator function declarator 8-11 scope resolution operator * 3-7 -see indirection operator ::*, pointer to member -see multiplication declarator 8-8 operator < pointer declarator 8-6 -see less than operator *= operator 5-26 template and 14-3 + << -see left shift operator -see addition operator <<= operator 5-26 -see unary plus operator <= -see less than or equal ++ -see increment operator to operator += operator 5-15, 26 = -see assignment operator - == -see equality operator -see subtraction operator > -see greater than operator -see unary minus operator >= -see greater than or -- -see decrement operator equal operator -= operator 5-26 >> -see right shift operator -> -see class member access >>= operator 5-26 operator ?: -see conditional expression operator x X FO 5950 x X NP 650 2 Index DRAFT: 25 January 1994 [] control, member function -see subscripting operator and 12-1 array declarator 8-9 control, overloading \ -see backslash resolution and 10-5 ^ -see bitwise exclusive OR declaration 11-3 operator declaration, overloaded ^= operator 5-26 name and 11-5 _ default assignment underscore character 2-6 operator 12-18 underscore in identifier default copy constructor 2-7 12-18 {} example, member name 11-3 block statement 6-2 member name 11-1 class declaration 9-1 overloading and 13-3 class definition 9-1 protected member 11-8 enum declaration 7-13 rules, template 14-16 initializer list 8-18 specifier 11-1/2 | -see bitwise inclusive OR specifier and friend 11-7 operator specifier and object |= operator 5-26 layout 11-2 || -see logical OR operator struct default member 9-1 ~ union default member 9-1 -see destructor virtual function 11-9 -see one's complement access-specifier 10-1 operator addition operator 5-21 0 additive operator 5-21 -see also zero, null additive-expression 5-21 null character 2-13 address string terminator 2-13 of bit-field 9-14 of bit-field restriction 9-14 A of constructor 12-2 abort() 3-11, 15-6 of overloaded function abs 17-252, 259, 267 5-15, 13-9 abstract of qualified name 5-14 class 10-11 address-of operator 5-14 class, constructor and adjustfield 17-55 10-12 adjusting base class member class, pointer to 10-11 access 11-3 abstract-declarator 8-3 adjustment access array parameter 8-12 adjusting base class function parameter 8-12 member 11-3 aggregate 8-18 ambiguity, member 10-4 initialization 12-12 and friend, class 11-7 alert 2-11 and friend function 11-6 alias 7-20, 17-6, 11 base class 11-2 alignment base class member 10-1 of bit-field 9-14 class member 5-6 of bit-field, control 11-1 implementation dependency control, anonymous union 9-14 9-13 requirement, control default 11-1 implementation dependency 3-14 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 3 17-4/6, 10 this and constructor C-15 17-4/6, 10 this and destructor C-15 allocation AND function 12-9 operator, bitwise 5-24 implementation dependency operator, logical 5-25 9-5, 11-2 operator, side effects and implementation dependency logical 5-25 base class 10-2 anonymous implementation dependency union 9-13 bit-field 9-14 union access control 9-13 new, storage 5-16 union, extension to C C-2 allowing an exception 15-5 union, global 9-13 altermate definition 17-14 union restriction 9-13 ambiguity app 17-55 base class member 10-4 arg 17-252, 260, 267 class conversion 10-7 argc 3-9 declaration type 7-2 argument 1-2, 17-13, 17, declaration versus cast 26, 28, 35/37, 46/47, 49, 8-3 66, 119/120, 153, 210/211, declaration versus 218/219, 232, 234/237 expression 6-8 and name hiding, default detection, overloaded 8-15 function 13-3 binding of default 8-14 function declaration 8-18 class object as 12-13 if-else 6-3 conversion 5-5, 8-12 member access 10-4 declaration, default 8-14 parentheses and 5-18 deduction, template 14-19 pointer conversion 4-4 evaluation of default pointer to member 8-14/15 conversion 4-5 evaluation, order of 5-6 reference conversion 4-4 evaluation, unspecified resolution, scoping 10-5 order of 5-6 Amendment 1 17-2, 12, 75 example of default 8-14 anachronism C-13 list, empty 8-11 C function definition list, variable 8-11 C-14 matching -see overloading assignment to this C-15 resolution cast of pointer to member overloaded operator and C-15 default 13-11 free store and constructor overloading and default C-15 8-15 free store and destructor passing 5-5 C-15 passing, reference and memory management C-15 8-21 nonnested class C-16 reference 5-5 old style base class scope of default 8-15 initializer C-14 specification, template old style function 14-18 definition C-14 substitution 16-7 overload keyword C-13 template 14-16 pointer to member temporary and default conversion C-15 12-4 scope of nested class to constructor, C-16 unspecified 5-18 x X FO 5950 x X NP 650 4 Index DRAFT: 25 January 1994 type checking 5-5 type 3-15, 8-12 type checking of default arrow operator -see class 8-14 member access operator type conversion 12-4 asm type, unknown 8-11 declaration 7-26 argv[] 3-9 implementation dependency arithmetic 7-26 conversion 4-2 assembler 7-26 exception 5-1 17-4/5 exception, implementation assignment dependency 5-1 and initialization, extension to C single overloaded 12-13 precision C-1 and lvalue 5-26 pointer 5-21/22 base class object 5-27 single precision floating const pointer 5-27 point 4-2 conversion by 5-27 type 3-15 derived class object 5-27 unsigned 3-14 expression 5-26 array extension to C memberwise bound 8-9 C-2 const 7-9 member 12-17 constructor and 5-18 memberwise 13-12 declaration 8-9 of class object 12-18 declarator [] 8-9 of derived class to base declarator, class 12-18 multidimensional 8-10 operator 5-26, 12-17, default constructor and 17-17, 53, 231/232 5-18 operator access, default example 8-10 12-18 initialization 8-18 operator, default 13-12 member 9-5 operator, default multidimensional 8-10 12-17/19 new 5-16 operator, overloaded of class objects and 13-12 constructor 12-13 operator restriction, of class objects and default 12-17/18 default constructor 12-13 pointer to const 5-27 of class objects and new pointer to member 5-27 5-17 pointer to volatile 5-27 of class objects reference 8-21 initialization 8-19, to class object 5-27 12-13 to pointer 5-27 order of execution, to pointer to member 5-27 constructor and 12-2 to pointer to member, zero order of execution, 5-27 destructor and 12-8 to pointer, zero 5-27 overloading and pointer to reference 5-27 versus 13-1 to this anachronism C-15 parameter adjustment 8-12 volatile pointer 5-27 pointer conversion 4-4 assignment-expression 5-26 size, default 8-10 assignment-operator 5-27 sizeof 5-16 associated sequence 17-81, storage of 8-10 155, 157, 162/163 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 5 ate 17-55 class member access 10-1 atexit 17-26 class member access, atexit() 3-10 adjusting 11-3 auto class member ambiguity destruction of 6-6/7 10-4 initialization 6-7 class object, assignment object initialization 5-27 8-17 class pointer conversion restriction 7-3 4-4 specifier 7-3 class, private 11-2 storage duration 3-11 class, public 11-2 automatic initialization class, reference to 4-4 6-7 class virtual -see virtual base class of integer literal 2-9 B basefield 17-55 backslash character 2-11 base-specifier 10-1 backspace 2-11 base-specifier-list 10-1 badbit 17-55 beg 17-55 badcast::badcast 17-35 behavior badcast::~badcast 17-35 default 17-15, 32, 42, badtypeid::badtypeid 17-51 46/49, 90/91, 93/95, 133, badtypeid::~badtypeid 17-51 144 badyypeid::do_raise 17-51 implementation-defined base 1-2 class 17-15/17, 21, 30, locale-specific 1-2 33/40, 44, 51, 58/59, 81, required 17-15 94, 99, 113, 125/126, undefined 1-3 134/136, 139, 144, 146, unspecified 1-3 148, 155, 157, 160, Ben 13-2 162/163, 242/243 binary class 10-1, 3 mode 17-62 class access 11-2 operator, interpretation class allocation, of 13-11 implementation dependency operator, overloaded 10-2 13-11 class, assignment of binary 17-55 derived class to 12-18 binding class cast 5-10 -see virtual function, class constructor order of dynamic execution 12-2 of default argument 8-14 class destructor order of bit-field 9-14 execution 12-8 address of 9-14 class, direct 10-1 alignment of 9-14 class, indirect 10-1 allocation, implementation class initialization dependency 9-14 12-14 declaration 9-14 class initialization, implementation dependency order of 12-14 alignment of 9-14 class initializer 8-16 implementation dependency class initializer sign of 9-14 anachronism, old style layout 9-14 C-14 restriction 9-14 x X FO 5950 x X NP 650 6 Index DRAFT: 25 January 1994 restriction, address of bitstring::operator<<= 9-14 17-221 restriction, pointer to bitstring::operator== 9-14 17-227 type of 9-14 bitstring::operator>> unnamed 9-14 17-228 zero width of 9-14 bitstring::operator>>= bit-fields, Boolean 3-15 17-221 bitmask type 17-20/21, 58, bitstring::operator^= 60/62, 124 17-221 17-4, 208 bitstring::operator|= bits::any 17-214 17-220 bits::bits 17-210 bitstring::operator~ 17-224 bits::count 17-214 bitstring::remove 17-223 bits::length 17-214 bitstring::replace 17-223 bits::none 17-214 bitstring::reset 17-224 bits::operator!= 17-214 bitstring::resize 17-225 bits::operator&= 17-211 bitstring::rfind 17-226 bits::operator<< 17-215 bitstring::set 17-223/224 bits::operator<<= 17-211 bitstring::substr 17-227 bits::operator== 17-214 bitstring::test 17-227 bits::operator>> 17-215 bitstring::toggle 17-224 bits::operator>>= 17-212 bitstring::to_string 17-225 bits::operator^= 17-211 bitstring::trim 17-226 bits::operator|= 17-211 bitwise bits::operator~ 17-213 AND operator 5-24 bits::reset 17-212 exclusive OR operator 17-4 5-24 bits::set 17-212 inclusive OR operator bits::test 17-214 5-25 bits::toggle 17-213 operator 5-24 bits::to_string 17-213 block bits::to_ulong 17-213 initialization in 6-7 bits::to_ushort 17-213 scope -see local scope 17-4, 216 statement {} 6-2 bitstring::any 17-227 structure 6-7 bitstring::append 17-221 body, function 8-15 bitstring::assign 17-222 bool bitstring::bitstring increment 5-8, 15 17-218/219 integer conversion 4-1 bitstring::count 17-225 type-specifier 7-10 bitstring::find 17-226 Boolean bitstring::insert 17-222 bit-fields 3-15 bitstring::length 17-225 constant 2-14 bitstring::none 17-228 conversion 4-5 17-4 literal 2-14 bitstring::operator!= type 3-14 17-227 type 3-14 bitstring::operator&= boolean-literal 2-14 17-220 bound array 8-9 bitstring::operator+= bound, of array 8-9 17-220 bound pointer to member bitstring::operator<< function, undefined C-15 17-228 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 7 break statement 6-5/6 overloading new, extension buffer, stream 17-58/59, to C-2 63, 81, 95/96, 98, pointer to member, 109/111, 123, 137, 146, extension to C-2 159, 164/165 protected, extension to buffered file 17-26, C-2 158/165 reference type, extension built-in type -see to C-1 fundamental type single precision byte 5-15 arithmetic, extension to string, null-terminated C-1 17-22 stream 17-26, 63, 99, 164 summary, compatibility with C-1 C summary, compatibility C with ISO C-3 anonymous union, extension type checking, extension to C-2 to C-1 class, extension to C-2 user-defined type, const, extension to C-1 extension to C-2 dangerous extension to void* pointer type C-13 extension to C-2 declaration statement, volatile, extension to extension to C-2 C-2 delete, extension to C-2 call destructor, extension to -see also function call, C-2 member function call, expression evaluation, overloaded function call, difference from C-1 virtual function call extension to C-1/2 by reference 5-5 function definition by value 5-5 anachronism C-14 operator function 13-11 header 17-5/6, 10, 12/13, calloc 17-26, 46/47 18, 23, 27 capacity 17-28 headers, ISO 2-8 carriage return 2-11 implementation dependency case label 6-1, 3/4 extension to C-13 17-4/5 inline function, extension cast to C-1 ambiguity, declaration library, Standard 17-2, versus 8-3 5, 12, 23, 48 base class 5-10 linkage to 7-26 class object 5-11 memberwise assignment, const 5-13 extension to C-2 derived class 5-10 memberwise initialization, dynamic 5-8, 17-34 extension to C-2 implementation dependency multiple inheritance, pointer to function 5-13 extension to C-2 integer to pointer 5-12 new, extension to C-2 lvalue 5-11, 13 overloading delete, of pointer to member extension to C-2 anachronism C-15 overloading, extension to operator 5-14, 20, 8-2 C-1 pointer to function 5-13 x X FO 5950 x X NP 650 8 Index DRAFT: 25 January 1994 pointer to integer 5-12 underscore 17-12 pointer to member 5-10, character-literal 2-10 13 checking reference 5-10, 13 point of error 14-4 reinterpret 5-12 syntax 14-4 reinterpretcast, lvalue 17-4 5-13 class 3-15, 9-1 cast, reinterpretcast, abstract 10-11 reference 5-13 access and friend 11-7 cast anachronism, nonnested static 5-9 C-16 staticcast, class object and type 9-1 5-11 base 17-15/17, 21, 30, staticcast, lvalue 5-11 33/40, 44, 51, 58/59, 81, cast, staticcast, reference 94, 99, 113, 125/126, 5-10 134/136, 139, 144, 146, cast to incomplete class 148, 155, 157, 160, 5-13 162/163, 242/243 cast-expression 5-20 base -see base class casting 5-6, 20 cast to incomplete 5-13 catch 15-1 constructor and abstract c-char 2-10 10-12 c-char-sequence 2-10 conversion 12-4 17-4 conversion ambiguity 10-7 17-4 declaration, forward 9-3, 17-4 10-1 C++ declaration {} 9-1 header 17-5/6, 10 definition 9-1, 4 library, Standard 17-2, definition 3-4 4, 13/15, 21/23, 27, 30, definition example 9-5 35/38, 46/49, 59, 75, 165 definition name hiding change to string literal, 9-2 undefined 2-13 definition, scope of 9-2 char definition {} 9-1 implementation dependency derived 17-21 sign of 3-14 derived -see derived class integer conversion 4-1 extension to C C-2 literal, implementation friend 11-6 dependency value of 2-12 generated 14-9 type 3-14 lattice -see DAG type, signed 3-14 linkage of 3-8 type specifier 7-10 linkage specification type, unsigned 3-14 7-27 character local -see local class array initialization 8-20 member -see also member constant 2-11 member access 5-6 decimal-point 17-22, 60 member access operator literal 2-11 5-6 literal, type of 2-11 member declaration 9-4 multibyte 1-2 member function 9-8 signed 3-14 member initialization string 2-13 8-18 type 3-14 member semantics 5-6 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 9 member, static 3-11 231, 242 member storage duration type restriction, member 3-11 of 12-14 member syntax 5-6 unnamed 7-8 name 8-2 class name as type definition type specifier 7-12 9-2 versus struct 9-1 name declaration 3-2 versus union 9-1 name, elaborated 7-12, class-key 7-12, 9-1 9-3 class-name 9-1 name, point of declaration class-specifier 9-1 9-4 17-4 name, scope of 9-2 17-4 name, typedef 7-8, 9-4 17-4 nested -see nested class comma object as argument 12-13 operator 5-27 object, assignment of operator, side effects and 12-18 5-28 object, assignment to comment 2-3 5-27 /* */ 2-5 object cast 5-11 // 2-5 object cast, staticcast, comparison 5-11 implementation dependency object, const 7-9, 9-10 pointer 5-24 object copy 12-17 pointer 5-23/24 object copy -see also copy pointer to function 5-23 constructor undefined pointer 5-22, object copy example 12-19 24 object initialization void* pointer 5-23 8-18, 12-12 compatibility object initialization -see with C summary C-1 also constructor with ISO C summary C-3 object layout 9-5, 10-3 compilation, separate 2-1 object, member 9-5 compiler control line -see object, operations on 9-1 preprocessing directive object return type 12-13 complete object 1-4 object, sizeof 5-15 completely-defined object objects and constructor, type 3-13 array of 12-13 17-4, 247 objects and default 17-4 constructor, array of compound 12-13 statement 6-2 objects and new, array of type 3-15 5-17 compound-statement 6-2 objects initialization, concatenation array of 8-19, 12-13 string 2-13 pointer to abstract 10-11 undefined string literal polymorphic 10-7 2-13 scope 3-6 condition conversion 4-5 scope of enumerator 7-15 condition 6-2 sizeof, empty 9-1 conditional specialized 14-9 expression operator 5-25 template 14-2, inclusion 16-3 17-118/120, 208/209, 229, x X FO 5950 x X NP 650 10 Index DRAFT: 25 January 1994 conditional-expression, constructor 12-1 throw-expression in 5-26 access, default copy conditions, rules for 6-3 12-18 conj 17-252, 260, 267 address of 12-2 consistency anachronism, free store example, linkage 7-4 and C-15 linkage 3-9, 7-4 anachronism, this and linkage specification C-15 7-27 and abstract class 10-12 type declaration 3-9 and array 5-18 const cast 5-13 and array order of *const example 8-6 execution 12-2 const 3-16 and const 9-10, 12-1 array 7-9 and initialization 12-12 assignment, pointer to and initialization example 5-27 12-12 class object 7-9, 9-10 and member function 12-3 constructor and 9-10, and member function call 12-1 12-16 destructor and 9-10, 12-7 and new 5-17 example 8-6 and new, implementation extension to C C-1 dependency 5-18 initialization 7-9, 8-17 and return 6-6 initialization, pointer to and static objects order 8-17 of execution 12-14 linkage of 3-8, 7-4 and virtual function call member function 9-10 12-16 member initialization and volatile 9-10, 12-1 12-14 array of class objects and operand 5-2 12-13 overloading and 13-1, 20 call, explicit 12-2 pointer assignment 5-27 conversion by 12-4 pointer initialization conversion by -see also 8-17 user-defined conversion reference 8-21 copy 12-1, 3, 17, 17-17, type 7-8 53, 231/232 void* pointer conversion default 17-85, 231/233, 4-3 240 volatile void* pointer default -see default conversion 4-3 constructor constant 2-8, 3-15, 5-2 default copy 12-17/19 character 2-11 definition 8-16 enumeration 7-14 example 12-2 expression 5-28 exception handling 15-3 expression, pointer to for temporary 12-3 member 5-14 inheritance of 12-1 integer 2-9 local object 3-11 long 2-9 order of execution, base pointer declaration 8-6 class 12-2 pointer example 8-6 order of execution, member unsigned 2-9 12-2 constant-expression 5-28 restriction 12-1/2 construction, order of 3-11 restriction, default copy 12-17/18 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 11 type of 12-2 null pointer 4-4 union 9-12 operator 5-2, 12-5 unspecified argument to out of range value, 5-18 undefined 4-2 continue overloaded function and in for statement 6-5 standard 13-7 statement 6-5/6 overloading resolution and control line -see 13-5 preprocessing directive overloading resolution and conversion pointer 13-10 -see also type conversion overloading resolution and Boolean 4-5 standard 13-7 ambiguity, class 10-7 overloading resolution and ambiguity, pointer 4-4 user-defined 13-7/8 ambiguity, pointer to pointer 4-3 member 4-5 pointer to function 4-4 ambiguity, reference 4-4 pointer to member 4-5 anachronism, pointer to pointer to member void* member C-15 4-5 and name hiding, user- reference 4-4 defined 12-7 return type 6-6 argument 5-5, 8-12 rules, type 4-2 arithmetic 4-2 safe floating point 4-2 array pointer 4-4 signed unsigned integer base class pointer 4-4 4-1 bool integer 4-1 standard 4-1 by assignment 5-27 to enumeration type 5-10 by constructor 12-4 to enumeration type, char integer 4-1 staticcast, 5-10 class 12-4 type of 12-5 condition 4-5 user-defined 5-2, 12-4/5 const void* pointer 4-3 virtual user-defined 12-6 const volatile void* void* pointer 4-3 pointer 4-3 volatile const void* derived class pointer 4-4 pointer 4-3 explicit type -see casting volatile void* pointer floating point integer 4-3 4-2 zero pointer 4-4 function -see also user- conversion-function-id 12-5 defined conversion conversions implementation defined cv-qualifier pointer 4-3 pointer integer 5-12/13 cv-qualifier reference implementation dependency 4-4 floating point 4-2 copy implementation dependency class object 12-17 integer 4-2 constructor 12-1, 3, 17, implicit 4-1, 5-2, 12-4 17-17, 53, 231/232 implicit user-defined constructor access, 12-6 default 12-18 inheritance of user- constructor, default defined 12-6 12-17/19 integer 4-1 constructor, implicitly- lvalue 4-1 declared 12-2 x X FO 5950 x X NP 650 12 Index DRAFT: 25 January 1994 constructor restriction, consistency, type 3-9 default 12-17/18 constant pointer 8-6 example, class object default argument 8-14 12-19 definition versus 3-2 cos 17-252, 260, 268 ellipsis in function 5-5, cosh 17-253, 260, 268 8-11 __cplusplus 16-13 enumerator, point of 3-7 17-4 example 3-3, 8-13 17-4 example, function 8-13 17-4 extern 3-2 17-4 extern, point of 3-8 17-4 extern reference 8-21 17-4, 23 forward 7-5 17-4 forward class 9-3, 10-1 17-4 friend, point of 3-8 ctor-initializer 12-14 function 3-2, 8-11 17-4, 99, 101, function member 9-8 189 function template 14-22 cur 17-55 hiding -see name hiding cv-qualifier 3-16 in for, scope of 6-5 pointer conversions 4-3 in for statement 6-5 reference conversions 4-4 in switch statement 6-4 cv-qualifier 8-2 matching, overloaded 17-4 function 13-2 17-4 member 9-4 multiple 3-9 name 3-2 D name, point of 3-7 DAG overloaded name and access multiple inheritance 10-4 11-5 nonvirtual base class overloaded name and friend 10-4 11-6 virtual base class 10-4 parameter 8-11/12 dangerous extension to C parentheses in 8-3, 6 C-13 pointer 8-6 data member -see member reference 8-7 deallocation -see delete register 7-3 dec 17-55, 71, 100, 114 specifier 7-2 decimal literal 2-9 statement 6-7 decimal-literal 2-9 statement, extension to C decimal-point character C-2 17-22, 60 static member 3-2 declaration 3-1/2, 7-1 storage class 7-3 :, field 9-14 type 8-5 access 11-3 type ambiguity 7-2 ambiguity, function 8-18 typedef 3-2 array 8-9 typedef as type 7-7 as definition 7-2 versus cast ambiguity 8-3 asm 7-26 versus expression bit-field 9-14 ambiguity 6-8 class member 9-4 {}, class 9-1 class name 3-2 {}, enum 7-13 class name, point of 9-4 declaration 7-1 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 13 declaration-seq 7-26 behavior 17-15, 32, 42, declaration-statement 6-7 46/49, 90/91, 93/95, 133, declarative region 3-1 144 declarator 7-1, 8-1 constructor 17-85, &, reference 8-7 231/233, 240 (), function 8-11 constructor 12-1, 14, 17 *, pointer 8-6 constructor and array ::*, pointer to member 5-18 8-8 constructor and [], array 8-9 initialization 12-12 example 8-3 constructor and new initializer, temporary and 5-17/18 12-4 constructor, array of meaning of 8-5 class objects and 12-13 multidimensional array copy constructor 12-17/19 8-10 copy constructor access declarator 8-2 12-18 declarator-id 8-2 copy constructor decl-specifier 7-2 restriction 12-17/18 decrement destructor 12-7 operator 5-8, 14/15 initialization 8-18 operator, overloaded member access, struct 9-1 13-13 member access, union 9-1 deduction, template argument template parameter 14-14 14-19 default label 6-1, 3/4 default default_size 17-28 access control 11-1 #define 16-7 argument and name hiding 17-4, 27 8-15 17-4 argument, binding of 8-14 definition 3-2, 17-22 argument declaration 8-14 altermate 17-14 argument, evaluation of and initialization 7-2 8-14/15 class 3-4 argument, example of 8-14 class 9-1, 4 argument, overloaded class name as type 9-2 operator and 13-11 constructor 8-16 argument, overloading and declaration as 7-2 8-15 enumerator 3-4 argument, overloading enumerator point of 7-14 resolution and 13-4 example 3-3 argument, scope of 8-15 example, function 8-16 argument, temporary and example, nested class 12-4 9-15 argument, type checking of function 3-4 8-14 function 8-15 array size 8-10 function template 14-22 assignment operator 13-12 inline member function assignment operator 3-9 12-17/19 local class 9-16 assignment operator access member 9-9 12-18 member function 9-9, 11 assignment operator name hiding, class 9-2 restriction 12-17/18 namespace 7-16 x X FO 5950 x X NP 650 14 Index DRAFT: 25 January 1994 nested class 9-14 destruction object 3-4 of auto 6-6/7 of template 14-1 of local static 6-7 pure virtual function of local variable 6-6/7 10-11 of temporary 12-3 scope, macro 16-9 of temporary, order of scope of class 9-2 12-4 scope of function 3-9 order of 3-11 static member 9-12 destructor 12-7, 17-17, 41, versus declaration 3-2 164, 231 virtual function 10-9 anachronism, free store {}, class 9-1 and C-15 definitions, anachronism, this and implementation-generated C-15 3-3 and array order of delete 5-18/19, 12-10 execution 12-8 destructor and 5-19, 12-8 and const 9-10, 12-7 example 12-11 and delete 5-19, 12-8 example, destructor and and delete example 12-11 12-11 and exit from scope 6-6 example, scope of 12-11 and fundamental type 12-9 extension to C C-2 and member function 12-8 extension to C overloading and member function call C-2 12-16 operator 17-15, 46, 48 and placement of object overloading and 12-11 12-9 type of 12-11 and static objects order undefined 5-19 of execution 12-14 undefined value 5-19 and virtual function call delete[], operator 17-15, 12-16 46/47, 49 and volatile 9-10, 12-7 deleted object, undefined call example, explicit 5-19 12-9 delete-expression 5-18 call, explicit 12-8/9 dependent name 14-6 call, implicit 12-8 deprecated features 5-8, 15 call, unspecified 6-8 dereferencing 5-2 default 12-7 -see also indirection exception handling 15-3 derivation -see inheritance extension to C C-2 derived for temporary 12-3 class 17-21 inheritance of 12-7 class 10-1 local object 3-11 class cast 5-10 order of execution 12-8 class example 10-2 order of execution, base class, most 12-15 class 12-8 class object, assignment order of execution, member 5-27 12-8 class, overloading and program termination and 13-2 12-8 class pointer conversion pure virtual 12-8 4-4 restriction 12-7/8 class to base class, static object 3-10 assignment of 12-18 union 9-12 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 15 virtual 12-8 E diagnostic message 1-2 E suffix 2-12 difference from C expression elaborated evaluation C-1 class name 7-12, 9-3 digit 2-6 enum name 7-12 digit-sequence 2-12 type specifier 14-17 digraph 2-4, 8 type specifier 3-7 direct base class 10-1 type specifier -see direct-abstract-declarator elaborated class name 8-3 elaborated-type-specifier direct-declarator 8-2 7-11 directed acyclic graph -see #elif 16-3 DAG elimination of temporary directive 12-3 error 16-12 ellipsis null 16-12 example 8-13 pragma 16-12 in function declaration preprocessing 16-1 5-5, 8-11 direct-new-declarator 5-16 overloading resolution and distinct string 2-13 13-4, 6/7 division #else 16-4 by zero, undefined 5-1, else 6-2 21 empty implementation dependency argument list 8-11 5-21 class sizeof 9-1 operator 5-21 statement 6-1 do statement 6-4/5 end 17-55 dominance, virtual base #endif 16-4 class 10-6 endl 17-114, 118 dot operator -see class end-of-file 17-62, 73, 101, member access operator 104/108, 117, 189, 215, double quote 2-11 229 double ends 17-118 literal 2-12 entity 3-1 type 3-15 enum name, typedef 7-8 type specifier 7-10 enum _double_complex 17-256, declaration {} 7-13 262/267 name, elaborated 7-12 double_complex::double_complex overloading and 13-1 17-255 type of 7-13/14 dynamic type specifier 7-11 binding -see virtual enumerated type 3-14, function 17-19/20, 28, 58, 62 cast 5-8, 17-34 enumeration 7-13 initialization 3-10 constant 7-14 type 1-2 example 7-15 17-4, 229 type, conversion to 5-10 17-4 type, staticcast, dynarray 17-230/234, conversion to 5-10 239, 241/243 underlying type 7-14 enumerator class, scope of 7-15 definition 3-4 x X FO 5950 x X NP 650 16 Index DRAFT: 25 January 1994 linkage of 3-8 declaration 3-3, 8-13 member 7-15 declarator 8-3 point of declaration 3-7 definition 3-3 point of definition 7-14 delete 12-11 redefinition 7-14 derived class 10-2 restriction 7-14 destructor and delete value of 7-14 12-11 enumerator 7-13 ellipsis 8-13 environment, program 3-9 enumeration 7-15 EOF 17-73 explicit destructor call eofbit 17-55 12-9 equality operator 5-24 explicit qualification equality-expression 5-24 10-5 equivalence friend 9-3 template type 14-18 friend function 11-6 type 7-7, 9-2 function declaration 8-13 17-4, 12 function definition 8-16 error linkage consistency 7-4 checking, point of 14-4 local class 9-16 directive 16-12 member function 9-8, 11-6 #error 16-12 member name access 11-3 escape nested class 9-14 character -see backslash nested class definition sequence 2-11 9-15 sequence, undefined 2-11 nested class forward escape-sequence 2-10 declaration 9-16 evaluation nested type name 9-17 difference from C of default argument 8-14 expression C-1 of incomplete type 3-13 new, unspecified order of overloading 13-20 5-18 pointer to member 8-8 of default argument pure virtual function 8-14/15 10-11 of expression, order of scope of delete 12-11 5-1 scope resolution operator order of argument 5-6 10-5 unspecified order of 5-1 static member 9-12 unspecified order of subscripting 8-10 argument 5-6 type name 8-3 unspecified order of typedef 7-7 function call 5-6 unnamed parameter 8-16 exact match, overloading variable parameter list resolution 13-6 8-13 example virtual function 10-8/9 *const 8-6 exception array 8-10 allowing an 15-5 class definition 9-5 arithmetic 5-1 class object copy 12-19 declaration scope 3-5 const 8-6 handler 15-3, 17-14, 41 constant pointer 8-6 handling 15-1 constructor 12-2 handling constructor 15-3 constructor and handling destructor 15-3 initialization 12-12 implementation dependency arithmetic 5-1 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 17 throwing 15-2 to C const C-1 17-4, 29, 49 to C, dangerous C-13 exception-declaration 15-1 to C declaration statement 17-4 C-2 exception-specification to C delete C-2 15-5 to C destructor C-2 exit from scope, destructor to C, implementation and 6-6 dependency C-13 exit 17-26/27, 42, 49 to C inline function C-1 exit() 3-10 to C memberwise assignment EXIT_FAILURE 17-27 C-2 EXIT_SUCCESS 17-27 to C memberwise exp 17-253, 260, 268 initialization C-2 explanation, subscripting to C multiple inheritance 8-10 C-2 explicit to C new C-2 constructor call 12-2 to C overloading C-1 destructor call 12-8/9 to C overloading delete destructor call example C-2 12-9 to C overloading new C-2 instantiation syntax to C pointer to member 14-11 C-2 qualification 3-7, 7-25 to C protected C-2 qualification example to C reference type C-1 10-5 to C single precision type conversion -see arithmetic C-1 casting to C type checking C-1 exponent-part 2-12 to C user-defined type expression 5-1 C-2 ambiguity, declaration to C, void* pointer type versus 6-8 C-2 assignment 5-26 to C volatile C-2 constant 5-28 extern evaluation, difference "C" 17-12 from C C-1 "C++" 17-12 order of evaluation of declaration 3-2 5-1 linkage of 7-4 parenthesized 5-3 linkage specification pointer to member constant 7-26 5-14 point of declaration 3-8 postfix 5-4 reference declaration primary 5-2 8-21 reference 5-2 restriction 7-4 statement 6-1 external linkage 3-8, unary 5-14 17-10, 12 unspecified 5-6 expression 5-27 expression-list 5-4 F expression-statement 6-1 F suffix 2-12 extension f suffix 2-12 to C C-1/2 failbit 17-55 to C anonymous union C-2 fclose 17-149 to C class C-2 fflush 17-155 x X FO 5950 x X NP 650 18 Index DRAFT: 25 January 1994 fgetc 17-152, 159 point type 3-14 field declaration : 9-14 point type 3-15 File scope 3-6 point type, implementation file 2-1 dependency 3-15 buffered 17-26, 158/165 floating-constant 2-12 open 17-62 floating-suffix 2-12 scope 17-11/12 flush 17-64, 99, 110, seek 17-62 113/114, 118, 155 source 2-1, 17-2, 5 fopen 17-148/149 unbuffered 17-164/165 for filebuf::close 17-149 scope of declaration in filebuf::filebuf 17-148 6-5 filebuf::~filebuf 17-148 statement 6-4/5 filebuf::is_open 17-148 statement, continue in filebuf::open 17-148/149 6-5 filebuf::overflow 17-149, statement, declaration in 160 6-5 filebuf::pbackfail 17-150, form feed 2-11 160 formal filebuf::seekoff 17-153, argument -see also 161 parameter filebuf::seekpos 17-153, argument -see parameter 161 forward filebuf::sync 17-154, 162 class declaration 9-3, filebuf::uflow 17-152, 161 10-1 filebuf::underflow 17-151, declaration 7-5 160 declaration example, filebuf::xsgetn 17-153 nested class 9-16 filebuf::xsputn 17-153 fpos_t 17-75/76 final overrider 10-8 fprintf 17-111 fIoctal-digit 2-9 fputc 17-150, 159 fixed 17-55, 71 fractional-constant 2-12 float free literal 2-12 store -see also new, type 3-15 delete type specifier 7-10 store and constructor _float_complex 17-248/249 anachronism C-15 float_complex::float_complex store and destructor 17-248 anachronism C-15 floatfield 17-55 friend 2-8, 17-4 function, scope of 11-7 floating specifier 17-21 point arithmetic, single friend precision 4-2 access specifier and 11-7 point conversion, class 11-6 implementation dependency class access and 11-7 4-2 declaration, overloaded point conversion, safe name and 11-6 4-2 example 9-3 point integer conversion function, access and 11-6 4-2 function example 11-6 point literal 2-12 function, inline 11-7 point literal, type of function, linkage of 11-7 2-12 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 19 function, member function definition example 8-16 and 11-6 definition, scope of 3-9 function, nested class generated 14-9 9-16 global 17-12/13, 17 inheritance and 11-7 handler 17-15 member function 11-6 linkage specification point of declaration 3-8 7-27 specifier 7-8 linkage specification template and 14-24 overloaded 7-27 virtual and 10-9 member -see member fscanf 17-98 function fseek 17-149, 153/154 member declaration 9-8 fsetpos 17-154 name hiding 13-2 17-4, 18, 146 name, overloaded 13-20 17-4 operator 13-10 function overloaded -see also -see also friend function, overloading member function, inline parameter -see parameter function, virtual function parameter adjustment 8-12 allocation 12-9 pointer to member 5-20 argument -see argument prototype scope 3-5 body 8-15 return -see return call 5-5 return type -see return call evaluation, type unspecified order of 5-6 scope 3-5 call operator 5-4, 13-10 scope of friend 11-7 call operator, overloaded specialized 14-9 13-12 specifier 7-5 call, recursive 5-6 template 14-18 call, undefined 5-10, 13 template declaration cast, implementation 14-22 dependency pointer to template definition 14-22 5-13 type 3-15, 8-11/12 cast, pointer to 5-13 virtual -see virtual comparison, pointer to function 5-23 virtual member 17-15/17, conversion, pointer to 94 4-4 function-body 8-15 declaration 3-2, 8-11 function-definition 8-15 declaration ambiguity function-like macro 16-6 8-18 function-specifier 7-5 declaration, ellipsis in fundamental 5-5, 8-11 type 3-14 declaration example 8-13 type conversion -see declaration matching, conversion, user-defined overloaded 13-2 conversion declarator () 8-11 type, destructor and 12-9 definition 8-15 fvoid_t 17-27 definition 3-4 definition anachronism, C C-14 G definition anachronism, generated old style C-14 class 14-9 x X FO 5950 x X NP 650 20 Index DRAFT: 25 January 1994 constructor -see default I constructor id, qualified 5-3 destructor -see default identifier 2-6, 5-3, 7-1 destructor _, underscore in 2-7 function 14-9 identifier 2-6 getline 17-95, 97, 106/107, identities and overloading, 189 operator 13-11 global id-expression 5-3 anonymous union 9-13 id-expression 5-3 function 17-12/13, 17 #if 16-3, 17-13 name 3-6 if statement 6-2/3 scope 3-6 #ifdef 16-4 goodbit 17-55 if-else ambiguity 6-3 goto #ifndef 16-4 initialization and 6-7 ifstream::close 17-156 statement 6-1, 5, 7 ifstream::ifstream 17-155 grammar A-1 ifstream::~ifstream 17-155 greater ifstream::is_open 17-156 than operator 5-23 ifstream::open 17-156 than or equal to operator ifstream::rdbuf 17-156 5-23 imag 17-248/249, 251/253, 255/256, 258/260, 263, 266/268 H imanip 17-120 handler imanip::imanip 17-120 exception 15-3, 17-14, 41 implementation function 17-15 defined pointer integer handler 15-1 conversion 5-12/13 handler-seq 15-1 dependency __STDC__ 16-13 handling exception -see dependency alignment of exception handling bit-field 9-14 header dependency alignment C 17-5/6, 10, 12/13, 18, requirement 3-14 23, 27 dependency allocation C++ 17-5/6, 10 9-5, 11-2 primary 17-4/5, 10/11 dependency arithmetic secondary 17-4/5, 10/12 exception 5-1 headers dependency asm 7-26 ISO C 2-8 dependency base class library 2-8 allocation 10-2 standard 2-8 dependency bit-field hex number 2-12 allocation 9-14 hex 17-55, 71 dependency constructor and hexadecimal literal 2-9 new 5-18 hexadecimal-digit 2-9 dependency division 5-21 hexadecimal-escape-sequence dependency extension to C 2-11 C-13 hexadecimal-literal 2-9 dependency floating point hiding -see name hiding conversion 4-2 horizontal tab 2-11 dependency floating point type 3-15 dependency generation of temporary 12-3 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 21 dependency integer limits 1-2 conversion 4-2 type 17-19 dependency left shift implementation-defined 5-23 17-5, 16, 24, 27/28, 49, dependency linkage of 66 main() 3-10 behavior 1-2 dependency linkage implementation-generated specification 7-26 definitions 3-3 dependency modulus 5-21 implicit dependency object linkage conversion 4-1, 5-2, 12-4 7-28 destructor call 12-8 dependency overflow 5-1 user-defined conversion dependency parameters to 12-6 main() 3-9 implicitly-declared dependency pointer copy constructor 12-2 comparison 5-24 default constructor 12-1 dependency pointer in 17-55 subtraction 5-22 #include 16-4, 17-2, 6 dependency pointer to inclusion function cast 5-13 conditional 16-3 dependency promotion of source file 16-4 wchar_t 4-1 incomplete dependency range of types class, cast to 5-13 2-8 type 3-13 dependency sign of bit- type, example of 3-13 field 9-14 incompletely-defined object dependency sign of char type 3-13 3-14 increment dependency signed unsigned bool 5-8, 15 4-2 operator 5-8, 14/15 dependency sizeof operator, overloaded expression 5-16 13-13 dependency sizeof integral indeterminate uninitialized type 3-14 variable 8-18 dependency sizeof type indirect base class 10-1 3-14 indirection 5-14 dependency string literal operator 5-14 2-13 inequality operator 5-24 dependency type of integer inheritance 10-1 literal 2-10 -see also multiple dependency type of inheritance ptrdiff_t 5-22 and friend 11-7 dependency type of size_t of constructor 12-1 5-16 of destructor 12-7 dependency type of sizeof of overloaded operator expression 2-8 13-11 dependency value of char of user-defined conversion literal 2-12 12-6 dependency value of init-declarator 8-1 multicharacter literal init-declarator-list 8-1 2-11 initialization 8-16 dependency volatile 7-10 aggregate 12-12 dependency wchar_t 3-14 and goto 6-7 x X FO 5950 x X NP 650 22 Index DRAFT: 25 January 1994 and new 5-17, 12-13 initializer 8-17 array 8-18 base class 8-16 array of class objects list {} 8-18 8-19, 12-13 member 8-16 auto 6-7 scope of member 12-16 auto object 8-17 temporary and declarator automatic 6-7 12-4 base class 12-14 initializer 8-16 character array 8-20 initializer-clause 8-17 class member 8-18 initializer-list 8-17 class object 8-18, 12-12 injection from template, class object -see also name 14-8 constructor inline 17-13 const 7-9, 8-17 friend function 11-7 const member 12-14 function 7-5 const pointer 8-17 function, extension to C constructor and 12-12 C-1 default 8-18 function, linkage of 7-4, default constructor and 6 12-12 member function 7-6, 9-11 definition and 7-2 member function definition dynamic 3-10 3-9 example, constructor and member function rewriting 12-12 rules 9-11 extension to C memberwise inline C-2 linkage of 3-8 in block 6-7 specifier 7-5 jump past 6-4, 7 instantiation local object 3-11 and specialization 14-11 local static 6-7 multiple 14-11 member 12-14, 17 point of 14-9 member object 12-14 syntax, explicit 14-11 non-trivial 12-12 template 14-9 order of 3-10/11, 10-3 int order of base class 12-14 type 3-14 order of member 12-15 type specifier 7-10 order of virtual base type, unsigned 3-14 class 12-15 integer overloaded assignment and cast, pointer to 5-12 12-13 constant 2-9 parameter 5-5 conversion 4-1 pointer to const 8-17 conversion, bool 4-1 pointer to volatile 8-17 conversion, char 4-1 reference 8-8, 20 conversion, floating point reference member 12-14 4-2 run-time 3-10 conversion, implementation static member 9-12 defined pointer 5-12/13 static object 3-10, 8-17 conversion, implementation struct 8-18 dependency 4-2 union 8-19, 9-13 conversion, signed virtual base class 12-15, unsigned 4-1 17 literal 2-9 volatile pointer 8-17 literal, base of 2-9 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 23 literal, implementation ios::iword 17-69 dependency type of 2-10 17-4, 11 literal, type of 2-10 ios::openmode 17-62, 79, to pointer cast 5-12 82/83, 94/95, 123, type 3-15 132/133, 138/139, 142/149, integer-literal 2-9 153, 158, 161 integer-suffix 2-9 ios::open_mode 17-63, 79, integral 82/83, 147, 149 promotion 4-1, 5-5 ios::operator void* 17-64 type 3-14 ios::operator! 17-64 type 3-15 ios::precision 17-68 type, implementation ios::pword 17-69 dependency sizeof 3-14 ios::rdbuf 17-65 value, undefined ios::rdstate 17-65 unrepresentable 4-2 ios::seekdir 17-62, 79, internal linkage 3-8 82/83, 94, 123, 132, 138, internal 17-55, 71 142, 147, 153, 158, 161 interpretation ios::seek_dir 17-63, 79, 82 of binary operator 13-11 ios::setf 17-68 of unary operator 13-11 ios::setstate 17-66 invalidargument::do_raise ios::tie 17-65 17-36 17-4, 63, 164 invalidargument::invalidargument 17-4 17-35 ios::unsetf 17-68 invalidargument::~invalidargumenios::width 17-69 17-35 ios::xalloc 17-69 invocation, macro 16-7 ISO 17-4, 118 C headers 2-8 17-4 C summary, compatibility 17-4, 11, 55 with C-3 ios::bad 17-67 17-4, 24 ios::clear 17-66 iso_standard_library ios::copyfmt 17-64 17-10/12, 23 ios::eof 17-66 isspace 17-99, 101, 189 ios::exceptions 17-67 istdiostream::buffered ios::fail 17-67 17-162/163 ios::failure::do_raise istdiostream::istdiostream 17-60 17-162 ios::failure::failure 17-59 istdiostream::~istdiostream ios::failure::~failure 17-162 17-59 istdiostream::rdbuf 17-162 ios::fill 17-68 17-4, 95 ios::flags 17-67 istream::gcount 17-109 ios::fmtflags 17-60, istream::get 17-105/106 121/122 istream::getline 17-106/107 ios::good 17-66 istream::ignore 17-107 ios::init 17-70, 99, 113 istream::ipfx 17-99 ios::Init::Init 17-63 istream::isfx 17-99 ios::Init::~Init 17-64 istream::istream 17-99 ios::ios 17-64, 70 istream::~istream 17-99 ios::~ios 17-64 17-4 ios::iostate 17-61 istream::operator>> ios::io_state 17-62 17-100/103 x X FO 5950 x X NP 650 24 Index DRAFT: 25 January 1994 istream::peek 17-108 access specifier and istream::putback 17-108 object 11-2 istream::read 17-108 bit-field 9-14 istream::sync 17-109 class object 9-5, 10-3 istream::unget 17-109 left istringstream::istringstream shift, implementation 17-144 dependency 5-23 istringstream::~istringstream shift operator 5-23 17-145 shift, undefined 5-23 istringstream::rdbuf 17-145 left 17-55, 71 istringstream::str 17-145 length of name 2-6 istrstream::istrstream lengtherror::do_raise 17-36 17-134/135 lengtherror::lengtherror istrstream::~istrstream 17-36 17-135 lengtherror::~lengtherror istrstream::rdbuf 17-135 17-36 iteration statement 6-4 less iteration-statement 6-4, 6 than operator 5-23 scope 6-4 than or equal to operator 5-23 lexical conventions 2-1 J library Jessie 12-4 Standard C 17-2, 5, 12, jump 23, 48 past initialization 6-4, Standard C++ 17-2, 4, 7 13/15, 21/23, 27, 30, statement 6-5 35/38, 46/49, 59, 75, 165 jump-statement 6-5 headers 2-8 limits, implementation 1-2 2-8, 3-14, 17-4, K 100, 107, 126, 188, 210 keyword A-1 #line 16-11 anachronism, overload linkage 3-1/2, 8 C-13 consistency 3-9, 7-4 list 2-6 consistency example 7-4 mutable 3-12 external 3-8, 17-10, 12 Koenig, Andrew 15-1 implementation dependency object 7-28 internal 3-8 L of class 3-8 L of const 3-8, 7-4 prefix 2-11, 13 of enumerator 3-8 suffix 2-10, 12 of extern 7-4 l suffix 2-10, 12 of friend function 11-7 label 6-7 of inline 3-8 case 6-1, 3/4 of inline function 7-4, 6 default 6-1, 3/4 of local name 3-9 name space 6-1 of main(), implementation scope of 3-5, 6-1 dependency 3-10 specifier : 6-1 of member function 3-9 labeled statement 6-1 of static 3-8, 7-4, 27 lattice -see DAG, class of static member 3-9 layout of template 3-8 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 25 of typedef 3-8 class member function specification 7-26 9-16 specification class 7-27 class, member function in specification consistency 9-11 7-27 class restriction 9-16 specification, extern class restriction, static 7-26 member 9-11 specification function class, scope of 9-16 7-27 name, linkage of 3-9 specification, object constructor 3-11 implementation dependency object destructor 3-11 7-26 object initialization specification object 3-11 7-27/28 object, static 3-11 specification overloaded object storage duration function 7-27 3-11 to C 7-26 scope 3-5 linkage-specification 7-26 static, destruction of list 6-7 keyword 2-6 static initialization 6-7 operator 2-7, 13-10 variable, destruction of {}, initializer 8-18 6-6/7 literal 2-8, 5-2 17-4, 22, 24 base of integer 2-9 locale-specific behavior character 2-11 1-2 decimal 2-9 log 17-253, 260, 268 double 2-12 logical float 2-12 AND operator 5-25 floating point 2-12 AND operator, side effects hexadecimal 2-9 and 5-25 implementation dependency OR operator 5-25 string 2-13 OR operator, side effects implementation dependency and 5-25 type of integer 2-10 negation operator 5-14/15 implementation dependency long value of char 2-12 constant 2-9 implementation dependency double literal 2-12 value of multicharacter double type 3-15 2-11 literal 2-9/10 integer 2-9 type 3-14 long 2-9/10 type specifier 7-10 long double 2-12 type, unsigned 3-14 multicharacter 2-11 typedef and 7-3 octal 2-9 long_double_complex type of character 2-11 17-262/263, 268 type of floating point long_double_complex::long_double_complex 2-12 17-262/263 type of integer 2-10 longjmp 17-26 unsigned 2-9/10 long-suffix 2-9 literal 2-8 lookup local name 3-2 class definition 9-16 template name 14-3 class example 9-16 lowercase 17-22, 61 x X FO 5950 x X NP 650 26 Index DRAFT: 25 January 1994 lvalue 3-17 declaration, class 9-4 assignment and 5-26 declaration, static 3-2 cast 5-11, 13 definition 9-9 cast, reinterpretcast, definition, static 9-12 5-13 destructor order of cast, staticcast, 5-11 execution 12-8 conversion 4-1 enumerator 7-15 modifiable 3-17 example, static 9-12 function and access control 12-1 M function and friend macro function 11-6 definition scope 16-9 function call, constructor function-like 16-6 and 12-16 invocation 16-7 function call, destructor masking 17-13 and 12-16 name 16-6 function call, undefined object-like 16-6 9-10 parameters 16-7 function, class 9-8 preprocessor 16-1 function, const 9-10 replacement 16-6 function, constructor and main() 3-9 12-3 implementation dependency function definition 9-9, linkage of 3-10 11 implementation dependency function definition, parameters to 3-9 inline 3-9 parameters to 3-9 function, destructor and return from 3-10 12-8 malloc 17-26, 46/47 function example 9-8, management anachronism, 11-6 memory C-15 function, friend 11-6 masking macro 17-13 function in local class 17-4 9-11 meaning of declarator 8-5 function in nested class member 9-11 -see also base class function, inline 7-6, member 9-11 access operator, function, linkage of 3-9 overloaded 13-12 function, local class access ambiguity 10-4 9-16 access, base class 10-1 function, nested class access, class 5-6 9-15 access, protected 11-8 function, overloading access, struct default resolution and 13-5 9-1 function rewriting rules, access, union default 9-1 inline 9-11 array 9-5 function, static 9-9, 11 assignment 12-17 function template 14-23 cast, pointer to 5-10, 13 function, union 9-12 class object 9-5 function, virtual constructor order of 17-15/17, 94 execution 12-2 function, volatile 9-10 declaration 9-4 initialization 12-14, 17 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 27 initialization, const text 17-62 12-14 modifiable lvalue 3-17 initialization, order of modulus 12-15 implementation dependency initialization, reference 5-21 12-14 operator 5-21 initialization, static most derived class 12-15 9-12 multibyte initializer 8-16 character 1-2 initializer, scope of string, null-terminated 12-16 17-22 linkage of static 3-9 multicharacter local class restriction, literal 2-11 static 9-11 literal, implementation name access 11-1 dependency value of 2-11 name access example 11-3 multidimensional name, overloaded 9-5 array 8-10 object initialization array declarator 8-10 12-14 multiple of class type restriction declaration 3-9 12-14 inheritance 10-1, 3 pointer to -see pointer to inheritance DAG 10-4 member inheritance, extension to static 9-11 C C-2 static class 3-11 inheritance, virtual and storage duration, class 10-9 3-11 instantiation 14-11 template and static 14-25 multiplication operator type of static 5-14, 9-12 5-21 use, static 9-12 multiplicative operator member-declaration 9-4 5-21 member-declarator 9-4 multiplicative-expression member-specification 9-4 5-21 memberwise mutable keyword 3-12 assignment 13-12 assignment, extension to C C-2 N initialization, extension name 2-6, 3-1, 5-3 to C C-2 address of qualified 5-14 memchr 17-24 and translation unit 3-2 memcmp 17-185, 205 class -see class name mem-initializer 12-14 declaration 3-2 memory dependent 14-6 management -see also new, elaborated enum 7-12 delete global 3-6 management anachronism hiding 3-6, 8, 5-2/3, 6-7 C-15 hiding, class definition model 1-4 9-2 message, diagnostic 1-2 hiding, function 13-2 missing storage class hiding, overloading versus specifier 7-4 13-2 mode hiding, user-defined binary 17-62 conversion and 12-7 x X FO 5950 x X NP 650 28 Index DRAFT: 25 January 1994 injection from template extension to C overloading 14-8 C-2 length of 2-6 implementation dependency linkage of local 3-9 constructor and 5-18 lookup 3-2 initialization and 5-17, lookup, template 14-3 12-13 macro 16-6 operator 17-15, 26, 45/50 overloaded function 13-20 placement syntax 5-17 overloaded member 9-5 scoping and 5-16 point of declaration 3-7 storage allocation 5-16 qualified 7-25 type of 12-10 reserved 17-11 unspecified order of resolution, template 14-3 evaluation 5-18 scope of 3-5 unspecified value 5-17 space, label 6-1 new[], operator 17-15, type -see type name 45/47, 49/50 unreserved 17-18 new-declarator 5-16 use of template 14-5 new-expression 5-16 namespace 17-6, 10/12, 23 2-8 definition 7-16 new-initializer 5-16 scope 3-6 new-line 2-11 namespaces 7-16 17-4 NDEBUG 17-5 new-placement 5-16 negation operator, logical new-type-id 5-16 5-14/15 nondigit 2-6 nested nonnested class anachronism class anachronism, scope C-16 of C-16 non-trivial class definition 9-14 implicitly-declared class definition example default constructor 12-1 9-15 initialization 12-12 class example 9-14 nonvirtual base class DAG class forward declaration 10-4 example 9-16 nonzero-digit 2-9 class friend function norm 17-253, 260, 268 9-16 noshowbase 17-71 class member function noshowpoint 17-71 9-15 noskipws 17-72 class, member function in notation, syntax 1-3 9-11 nouppercase 17-72 class, scope of 9-14 NPOS 17-27 type name 9-17 NTBS 17-22, 31/32, 111, type name example 9-17 114, 118, 134, 136, 148 type name, scope of 9-17 static 17-22 17-4, 10, 15, 26, 43 NTMBS 17-22/23, 30/32, new 5-16/17, 12-9 35/38, 44, 52, 59 array 5-16 NTWCS 17-23 array of class objects and static 17-23 5-17 null constructor and 5-17 character 0 2-13 default constructor and directive 16-12 5-17/18 pointer 4-3, 5, 5-23 extension to C C-2 pointer conversion 4-4 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 29 reference 8-8 ofstream::close 17-158 statement 6-1 ofstream::is_open 17-158 null-terminated ofstream::ofstream 17-157 byte string 17-22 ofstream::~ofstream 17-157 multibyte string 17-22 ofstream::open 17-158 wide-character string ofstream::rdbuf 17-157 17-23 old number style base class hex 2-12 initializer anachronism octal 2-12 C-14 style function definition anachronism C-14 O omanip 17-120/121 object 1-4, 3-1/2, 17 omanip::omanip 17-121 class -see also class one-definition rule 3-4 object one's complement operator complete 1-4 5-14/15 constructor, local 3-11 open file 17-62 definition 3-4 operand destructor and placement const 5-2 of 12-9 reference 5-2 destructor, local 3-11 volatile 5-2 destructor static 3-10 operations on class object initialization, auto 8-17 9-1 initialization, local operator 3-11 %= 5-26 initialization, static &= 5-26 3-10, 8-17 *= 5-26 layout, access specifier += 5-15, 26 and 11-2 -= 5-26 linkage, implementation /= 5-26 dependency 7-28 <<= 5-26 linkage specification >>= 5-26 7-27/28 ^= 5-26 static local 3-11 additive 5-21 storage duration, local address-of 5-14 3-11 assignment 5-26, 12-17, temporary -see temporary 17-17, 53, 231/232 type, completely-defined bitwise 5-24 3-13 bitwise AND 5-24 type, incompletely-defined bitwise exclusive OR 5-24 3-13 bitwise inclusive OR 5-25 undefined deleted 5-19 cast 5-14, 20, 8-2 unnamed 12-2 class member access 5-6 object-like macro 16-6 comma 5-27 oct 17-55, 72 conditional expression octal 5-25 literal 2-9 conversion 5-2, 12-5 number 2-12 decrement 5-8, 14/15 octal-escape-sequence 2-10 default assignment 13-12 octal-literal 2-9 delete -see delete offsetof 17-26 division 5-21 ofstream 17-156/157 equality 5-24 x X FO 5950 x X NP 650 30 Index DRAFT: 25 January 1994 example, scope resolution |= 5-26 10-5 operator function call 5-4, 13-10 delete 17-15, 46, 48 function call 13-11 delete[] 17-15, 46/47, 49 greater than 5-23 function 13-10 greater than or equal to new 17-15, 26, 45/50 5-23 new[] 17-15, 45/47, 49/50 identities and overloading overloaded 13-10 13-11 operator!= 17-51, 53, 75, increment 5-8, 14/15 78, 188, 207/208, 214, indirection 5-14 216, 227, 251, 259, inequality 5-24 266/267 left shift -see left shift operator& 17-20, 215, 228 operator operator&= 17-20, 208, 211, less than 5-23 216, 220 less than or equal to operator* 17-250, 257, 265 5-23 operator*= 17-247/248, list 2-7, 13-10 255/256, 262/263 logical AND 5-25 operator+ 17-75, 77, logical OR 5-25 186/187, 206, 228, 241, logical negation 5-14/15 246/247, 249/250, 256, modulus 5-21 258, 264, 266 multiplication 5-21 operator+= 17-75, 77, 166, multiplicative 5-21 171/172, 190, 195, 216, new -see new 220, 230, 235, 241, 243, one's complement 5-14/15 247/248, 255, 262/263 overloaded 5-1 operator- 17-75/77, 249, overloading -see also 251, 257/258, 264, 266 overloaded operator operator-= 17-75, 77, overloading restrictions 247/248, 255/256, 262/263 13-10 operator/ 17-250, 257/258, pointer to member 5-20 265 precedence of 5-1 operator/= 17-247/248, relational 5-23 255/256, 262/263 right shift; right shift operator<< 17-71, 110, operator 5-23 114/116, 119, 121, 189, scope resolution 3-6/7, 208, 215/216, 228/229, 5-2/3, 9-9, 10-1, 11 252, 259, 267 shift -see left shift operator== 17-51/52, 75, operator, right shift 78, 187, 206/208, 214, operator 216, 227, 251, 258, 266 side effects and comma operator>> 17-95, 97, 5-28 100/103, 117, 119/120, side effects and logical 188, 208, 215/216, AND 5-25 228/229, 252, 259, 267 side effects and logical operator^ 17-20, 215, 229 OR 5-25 operator^= 17-20, 208, 211, sizeof 5-14/15 216, 221 subscripting 5-4, 13-10 operator| 17-20, 215, 228 unary 5-14 operator~ 17-20, 208, 213, unary minus 5-14/15 216, 224 unary plus 5-14/15 operator 13-10 use, scope resolution operator-function-id 13-10 9-12 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 31 operators in expressions, of member initialization overloaded 13-13 12-15 optimization of temporary of virtual base class -see elimination of initialization 12-15 temporary ostdiostream::buffered OR 17-164 operator, bitwise ostdiostream::ostdiostream exclusive 5-24 17-163 operator, bitwise ostdiostream::~ostdiostream inclusive 5-25 17-163 operator, logical 5-25 ostdiostream::rdbuf 17-163 operator, side effects and 17-4, 109 logical 5-25 ostream::flush 17-118 order 17-4 of argument evaluation ostream::operator<< 5-6 17-114/116 of argument evaluation, ostream::opfx 17-113 unspecified 5-6 ostream::osfx 17-114 of base class ostream::ostream 17-113 initialization 12-14 ostream::~ostream 17-113 of construction 3-11 ostream::put 17-117 of destruction 3-11 ostream::write 17-117/118 of destruction of ostringstream::ostringstream temporary 12-4 17-146 of evaluation new, ostringstream::~ostringstream unspecified 5-18 17-146 of evaluation of ostringstream::rdbuf 17-146 expression 5-1 ostringstream::str 17-146 of evaluation, unspecified ostrstream::freeze 17-136 5-1 ostrstream::ostrstream of execution, base class 17-136 constructor 12-2 ostrstream::~ostrstream of execution, base class 17-136 destructor 12-8 ostrstream::pcount 17-137 of execution, constructor ostrstream::rdbuf 17-136 and array 12-2 ostrstream::str 17-136 of execution, constructor out of range value, and static objects 12-14 undefined conversion 4-2 of execution, destructor out 17-55 12-8 outofrange 17-37, 168, 192, of execution, destructor 210, 218, 232 and array 12-8 outofrange::do_raise 17-37 of execution, destructor outofrange::outofrange and static objects 12-14 17-37 of execution, member outofrange::~outofrange constructor 12-2 17-37 of execution, member overflow 5-1 destructor 12-8 implementation dependency of function call 5-1 evaluation, unspecified overflow::do_raise 17-38 5-6 overflow::overflow 17-38 of initialization overflow::~overflow 17-38 3-10/11, 10-3 overload resolution, template 14-21 x X FO 5950 x X NP 650 32 Index DRAFT: 25 January 1994 overload keyword anachronism and pointer 13-20 C-13 and pointer versus array overloaded 13-1 assignment and and reference 13-20 initialization 12-13 and return type 13-1 assignment operator 13-12 and scope 13-2 binary operator 13-11 and specialization 14-23 decrement operator 13-13 and static 13-1 function, address of and typedef 13-1 5-15, 13-9 and volatile 13-1, 20 function ambiguity delete, extension to C detection 13-3 C-2 function and standard example 13-20 conversion 13-7 extension to C C-1 function call operator new, extension to C C-2 13-12 operator identities and function call resolution 13-11 -see also argument postfix ++ and -- 13-13 matching, overloading prefix ++ and -- 13-13 resolution resolution 13-3 function declaration resolution and access matching 13-2 control 10-5 function, linkage resolution and conversion specification 7-27 13-5 function name 13-20 resolution and default increment operator 13-13 argument 13-4 member access operator resolution and ellipsis 13-12 13-4, 6/7 member name 9-5 resolution and member name and access function 13-5 declaration 11-5 resolution and pointer name and friend conversion 13-10 declaration 11-6 resolution and promotion operator 13-10 13-6 operator 5-1 resolution and standard operator 13-10 conversion 13-7 operator and default resolution and user- argument 13-11 defined conversion 13-7/8 operator, inheritance of resolution exact match 13-11 13-6 operators in expressions resolution rules 13-6 13-13 resolution, template subscripting operator function 14-18 13-12 resolution trivial unary operator 13-11 conversions 13-6 overloading 8-11, 9-2, restriction 13-11 13-20 subsequence rule 13-5 and access 13-3 versus name hiding 13-2 and const 13-1, 20 overrider, final 10-8 and default argument 8-15 and delete 12-11 and derived class 13-2 and enum 13-1 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 33 P assignment to 5-27 parameter 1-2, 8-16 assignment, volatile 5-27 adjustment, array 8-12 cast, integer to 5-12 adjustment, function 8-12 comparison 5-23/24 declaration 8-11/12 comparison, implementation default template 14-14 dependency 5-24 example, unnamed 8-16 comparison, undefined initialization 5-5 5-22, 24 list example, variable comparison, void* 5-23 8-13 conversion 4-3 list, variable 5-5, 8-11 conversion ambiguity 4-4 reference 8-7 conversion, array 4-4 scope of 3-5 conversion, base class void 8-11 4-4 parameter type list 8-12 conversion, const void* parameter-declaration 8-11 4-3 parameterized type -see conversion, const volatile template void* 4-3 parameters conversion, derived class macro 16-7 4-4 to main() 3-9 conversion, null 4-4 to main(), implementation conversion, overloading dependency 3-9 resolution and 13-10 parentheses conversion, void* 4-3 and ambiguity 5-18 conversion, volatile const in declaration 8-3, 6 void* 4-3 parenthesized expression conversion, volatile void* 5-3 4-3 period 17-22 conversion, zero 4-4 phases, translation 2-1 conversions, cv-qualifier placement 4-3 of object, destructor and declaration 8-6 12-9 declarator * 8-6 syntax, new 5-17 example, constant 8-6 pm-expression 5-20 initialization, const POD-struct 8-20 8-17 point initialization, volatile of declaration class name 8-17 9-4 integer conversion, of declaration enumerator implementation defined 3-7 5-12/13 of declaration extern 3-8 null 4-3, 5, 5-23 of declaration friend 3-8 overloading and 13-20 of declaration name 3-7 subtraction, of definition, enumerator implementation dependency 7-14 5-22 of error checking 14-4 terminology 3-16 of instantiation 14-9 to abstract class 10-11 type, floating 3-14 to bit-field restriction pointer 9-14 -see also void* to const assignment 5-27 arithmetic 5-21/22 to const initialization assignment, const 5-27 8-17 x X FO 5950 x X NP 650 34 Index DRAFT: 25 January 1994 to function cast 5-13 142/143, 151/154 to function cast, postfix implementation dependency ++ and -- 5-8 5-13 ++ and --, overloading to function comparison 13-13 5-23 expression 5-4 to function conversion potential scope 3-1 4-4 pow 17-253/254, 261, 269 to integer cast 5-12 pragma directive 16-12 to member 3-15, 5-20 #pragma 16-12 to member anachronism, precedence of operator 5-1 cast of C-15 prefix to member, assignment ++ and -- 5-15 5-27 ++ and --, overloading to member, assignment to 13-13 5-27 L 2-11, 13 to member cast 5-10, 13 preprocessing 16-1 to member constant directive 16-1 expression 5-14 preprocessing-token 2-3 to member conversion 4-5 preprocessor, macro 16-1 to member conversion primary ambiguity 4-5 expression 5-2 to member conversion header 17-4/5, 10/11 anachronism C-15 private 11-1 to member declarator ::* base class 11-2 8-8 program 3-8 to member example 8-8 environment 3-9 to member, extension to C start 3-9/10 C-2 startup 17-2, 15 to member function 5-20 termination 3-10/11 to member function, termination and destructor undefined bound C-15 12-8 to member operator 5-20 promotion to member void* conversion integral 4-1, 5-5 4-5 of wchar_t, implementation to member, zero assignment dependency 4-1 to 5-27 overloading resolution and to volatile assignment 13-6 5-27 protected 11-1 to volatile initialization extension to C C-2 8-17 member access 11-8 type 3-15 protection 17-21 type extension to C, void* -see access control C-2 ptrdiff_t 5-22, 17-27 versus array, overloading implementation dependency and 13-1 type of 5-22 zero 4-3, 5, 5-23 17-4, 241 zero assignment to 5-27 17-4 polar 17-253, 261, 268 ptrdynarray 17-232, polymorphic 241/243 class 10-7 ptrdynarray::append type 10-7 17-243/244 position, stream 17-75/78, ptrdynarray::assign 81, 92/95, 131/133, 17-244 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 35 ptrdynarray::base 17-246 R ptrdynarray::get_at raise 17-14, 30, 45, 49, 17-245 66, 169, 193, 210, 218, ptrdynarray::insert 232 17-244 range of types, ptrdynarray::length implementation dependency 17-246 2-8 ptrdynarray::operator+= reach 3-7 17-243 real 17-248/249, 251/252, ptrdynarray::operator[] 254/256, 258/259, 261, 17-245 263, 266/267, 269 ptrdynarray::ptrdynarray realloc 17-26, 46/47 17-242/243 recursive function call 5-6 ptrdynarray::put_at redefinition 17-245 enumerator 7-14 ptrdynarray::remove typedef 7-7 17-245 reference 3-15 ptrdynarray::reserve and argument passing 8-21 17-246 and return 8-21 ptrdynarray::resize and temporary 8-21 17-246 argument 5-5 ptrdynarray::sub_array assignment 8-21 17-245 assignment to 5-27 ptrdynarray::swap 17-245 call by 5-5 ptr-operator 8-2 cast 5-10, 13 public 11-1 cast, reinterpretcast, base class 11-2 5-13 punctuators 2-7 cast, staticcast, 5-10 pure const 8-21 specifier 9-4 conversion 4-4 virtual destructor 12-8 conversion ambiguity 4-4 virtual function 10-11/12 conversions, cv-qualifier virtual function call, 4-4 undefined 10-12, 12-17 declaration 8-7 virtual function declaration, extern 8-21 definition 10-11 declarator & 8-7 virtual function example expression 5-2 10-11 initialization 8-8, 20 pure-specifier 9-4 member initialization 12-14 null 8-8 Q operand 5-2 qualification, explicit overloading and 13-20 3-7, 7-25 parameter 8-7 qualified restriction 8-8 id 5-3 sizeof 5-15 name 7-25 temporary, scope of 8-22 name, address of 5-14 to base class 4-4 qualified-id 5-3 type, extension to C C-1 question mark 2-11 volatile 8-21 quote references 3-12 double 2-11 region, declarative 3-1 single 2-11 register x X FO 5950 x X NP 650 36 Index DRAFT: 25 January 1994 declaration 7-3 restrictions, operator restriction 7-3 overloading 13-10 reinterpret cast 5-12 rethrow 15-3 reinterpretcast return lvalue cast 5-13 type 8-12 reference cast 5-13 type, class object 12-13 relational operator 5-23 type conversion 6-6 relational-expression 5-23 type, overloading and remainder operator -see 13-1 modulus operator return 6-5/6 replacement, macro 16-6 constructor and 6-6 required behavior 17-15 from main() 3-10 reraise 15-3 reference and 8-21 rescanning and replacement statement -see also return 16-8 rewriting rules, inline reserve 17-28 member function 9-11 reserved right shift operator 5-23 identifier 2-7 right 17-55, 72 name 17-11 rounding 4-2 word -see keyword rule, one-definition 3-4 resetiosflags 17-121 rules resolution for conditions 6-3 overloading -see inline member function overloading resolution rewriting 9-11 scoping ambiguity 10-5 overloading resolution template function 13-6 overloading 14-18 summary, scope 10-12 template name 14-3 type conversion 4-2 template overload 14-21 run-time initialization restriction 17-13/14 3-10 address of bit-field 9-14 rvalue 3-17 anonymous union 9-13 auto 7-3 bit-field 9-14 S constructor 12-1/2 safe floating point default assignment conversion 4-2 operator 12-17/18 s-char 2-13 default copy constructor s-char-sequence 2-13 12-17/18 scientific 17-55, 72 destructor 12-7/8 scope 3-1 enumerator 7-14 File 3-6 extern 7-4 class 3-6 local class 9-16 destructor and exit from member of class type 6-6 12-14 exception declaration 3-5 overloading 13-11 file 17-11/12 pointer to bit-field 9-14 function 3-5 reference 8-8 function prototype 3-5 register 7-3 global 3-6 static 7-4 iteration-statement 6-4 static member local class local 3-5 9-11 macro definition 16-9 union 9-13, 12-2 namespace 3-6 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 37 of class definition 9-2 setbase 17-122 of class name 9-2 setfill 17-122 of declaration in for 6-5 setiosflags 17-121/122 of default argument 8-15 setjmp 17-12 of delete example 12-11 17-4, 12, 26 of enumerator class 7-15 setlocale 17-22 of friend function 11-7 set_new_handler 17-45 of function definition setprecision 17-122 3-9 setterminate() 15-6 of label 3-5, 6-1 set_terminate 17-41 of local class 9-16 setunexpected() 15-7 of member initializer set_unexpected 17-41 12-16 setvbuf 17-154 of name 3-5 setw 17-123 of nested class 9-14 shift operator -see left of nested class shift operator, right anachronism C-16 shift operator of nested type name 9-17 shift-expression 5-23 of parameter 3-5 short of reference temporary type 3-14 8-22 type specifier 7-10 overloading and 13-2 type, unsigned 3-14 potential 3-1 typedef and 7-3 resolution operator showbase 17-55, 71/72 3-6/7, 5-2/3, 9-9, 10-1, showpoint 17-55, 71, 73 11 showpos 17-55, 72/73 resolution operator :: side 3-7 effects 5-1 resolution operator effects and comma operator example 10-5 5-28 resolution operator use effects and logical AND 9-12 operator 5-25 rules summary 10-12 effects and logical OR selection-statement 6-2 operator 5-25 scoping sign ambiguity resolution 10-5 of bit-field, and new 5-16 implementation dependency secondary header 17-4/5, 9-14 10/12 of char, implementation seek file 17-62 dependency 3-14 selection statement 6-2 sign 2-12 selection-statement 6-2 17-4 scope 6-2 signature 1-2 semantics, class member 5-6 signed separate char type 3-14 compilation 2-1 character 3-14 translation 2-1 typedef and 7-3 sequence unsigned, implementation associated 17-81, 155, dependency 4-2 157, 162/163 unsigned integer statement 6-1 conversion 4-1 sequencing operator -see simple-escape-sequence 2-10 comma operator simple-type-specifier 7-10 x X FO 5950 x X NP 650 38 Index DRAFT: 25 January 1994 sin 17-254, 261, 269 declaration 7-2 single elaborated type 3-7 precision arithmetic, friend 7-8 extension to C C-1 friend 17-21 precision floating point function 7-5 arithmetic 4-2 inline 7-5 quote 2-11 missing storage class 7-4 sinh 17-254, 262, 269 static 7-3 sizeof storage class 7-3 array 5-16 type -see type specifier class object 5-15 typedef 7-7 empty class 9-1 virtual 7-6 expression, implementation sqrt 17-254, 262, 270 dependency 5-16 17-4, 137 expression, implementation 17-4 dependency type of 2-8 stack unwinding 15-3 integral type, Standard implementation dependency C library 17-2, 5, 12, 3-14 23, 48 operator 5-14/15 C++ library 17-2, 4, reference 5-15 13/15, 21/23, 27, 30, string 2-13 35/38, 46/49, 59, 75, 165 type, implementation standard dependency 3-14 conversion 4-1 size_t 5-16, 17-27/28 conversion, overloaded implementation dependency function and 13-7 type of 5-16 conversion, overloading skipws 17-55, 72/73 resolution and 13-7 smanip 17-119 headers 2-8 smanip::smanip 17-119 start, program 3-9/10 source startup, program 17-2, 15 file 2-1, 17-2, 5 statement 6-1 file inclusion 16-4 -see also return, return space, white 2-3 break 6-5/6 special member function -see compound 6-2 also constructor, continue 6-5/6 destructor, inline continue in for 6-5 function, user-defined declaration 6-7 conversion, virtual declaration in for 6-5 function declaration in switch 6-4 specialization 14-9 do 6-4/5 instantiation and 14-11 empty 6-1 overloading and 14-23 expression 6-1 template 14-12 extension to C declaration specialized C-2 class 14-9 for 6-4/5 function 14-9 goto 6-1, 5, 7 specification, template if 6-2/3 argument 14-18 iteration 6-4 specifier jump 6-5 access -see access labeled 6-1 specifier null 6-1 auto 7-3 selection 6-2 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 39 sequence 6-1 implementation dependency switch 6-2/3, 6 16-13 while 6-4/5 2-8, 11, 13, {}, block 6-2 5-16, 17-4, 23/24, 26 statement 6-1 stdiobuf::buffered 17-160 static stdiobuf::overflow 17-160 NTBS 17-22 stdiobuf::pbackfail 17-160 NTWCS 17-23 stdiobuf::seekoff 17-161 cast 5-9 stdiobuf::seekpos 17-161 type 1-3 stdiobuf::setbuf 17-161 static stdiobuf::stdiobuf 17-160 class member 3-11 stdiobuf::~stdiobuf 17-160 destruction of local 6-7 stdiobuf::sync 17-161 initialization, local 6-7 stdiobuf::uflow 17-161 linkage of 3-8, 7-4, 27 stdiobuf::underflow 17-160 local object 3-11 stdiobuf::xsgetn 17-161 member 9-11 stdiobuf::xsputn 17-161 member declaration 3-2 17-4, 18/19, 24, member definition 9-12 26, 63, 73, 75/76, 98, member example 9-12 111, 147, 149/155, 159, member function 9-9, 11 164/165 member initialization 2-8, 3-10/11, 9-12 17-4, 23/24, 26/27, 41/42, member, linkage of 3-9 46/47, 49 member local class storage restriction 9-11 allocation new 5-16 member, template and class 3-1 14-25 class declaration 7-3 member, type of 5-14, class specifier 7-3 9-12 class specifier, missing member use 9-12 7-4 object, destructor 3-10 duration 3-11 object initialization duration, auto 3-11 3-10, 8-17 duration, class member objects order of 3-11 execution, constructor and duration, local object 12-14 3-11 objects order of management -see new, execution, destructor and delete 12-14 of array 8-10 overloading and 13-1 strchr 17-24 restriction 7-4 stream specifier 7-3 C 17-26, 63, 99, 164 variable, template and buffer 17-58/59, 63, 81, 14-25 95/96, 98, 109/111, 123, staticcast 137, 146, 159, 164/165 class object cast 5-11 position 17-75/78, 81, conversion to enumeration 92/95, 131/133, 142/143, type 5-10 151/154 lvalue cast 5-11 17-4, 73 reference cast 5-10 streambuf::eback 17-85 8-11, 17-4, 12 streambuf::egptr 17-85 __STDC__ 16-13 streambuf::epptr 17-86 x X FO 5950 x X NP 650 40 Index DRAFT: 25 January 1994 streambuf::gptr 17-85 constant 2-13 17-4 distinct 2-13 streambuf::overflow 17-89, literal 2-13 129 literal concatenation, streambuf::pbackfail 17-90, undefined 2-13 130 literal, implementation streambuf::pbase 17-86 dependency 2-13 streambuf::pbump 17-86 literal, type of 2-13 streambuf::pptr 17-86 literal, undefined change streambuf::pubseekoff 17-82 to 2-13 streambuf::pubseekpos 17-83 null-terminated byte streambuf::pubsetbuf 17-83 17-22 streambuf::pubsync 17-83 null-terminated multibyte streambuf::sbumpc 17-83 17-22 streambuf::seekoff 17-94, null-terminated wide- 132 character 17-23 streambuf::seekpos 17-95, sizeof 2-13 133 terminator 0 2-13 streambuf::setbuf 17-95, type of 2-13 133, 144 wide-character 2-13 streambuf::setg 17-86 string::append 17-172/173, streambuf::setp 17-86 195/196, 221 streambuf::sgetc 17-84 string::assign 17-173/175, streambuf::sgetn 17-84 196, 222 streambuf::snextc 17-84 stringbuf::overflow 17-140 streambuf::sputbackc 17-84 stringbuf::pbackfail 17-141 streambuf::sputc 17-84 stringbuf::seekoff 17-142 streambuf::sputn 17-85 stringbuf::seekpos 17-143 streambuf::streambuf 17-85, stringbuf::setbuf 17-143 148 stringbuf::str 17-139/140 streambuf::~streambuf 17-82 stringbuf::stringbuf 17-139 streambuf::sungetc 17-84 stringbuf::~stringbuf streambuf::sync 17-95, 133, 17-139 144 stringbuf::sync 17-144 streambuf::uflow 17-93/94, stringbuf::uflow 17-142 131, 142 stringbuf::underflow 17-142 streambuf::underflow 17-92, stringbuf::xsgetn 17-142 131 stringbuf::xsputn 17-142 streambuf::xsgetn 17-94, string::compare 17-185/186, 131, 142, 153, 161 205 streambuf::xsputn 17-94, string::copy 17-179, 200 131, 142, 153, 161 string::c_str 17-178 streamoff 17-74, 76, string::find 17-180, 132/133, 142/143 200/201, 226 streampos::offset 17-76 string::find_first_not_of streampos::operator+ 17-77 17-183/184, 203/204 streampos::operator+= 17-77 string::find_first_of streampos::operator- 17-181/182, 202 17-76/77 string::find_last_not_of streampos::operator== 17-78 17-184/185, 204 streampos::streampos 17-76 string::find_last_of string 17-182/183, 202/203 concatenation 2-13 string::get_at 17-177, 198 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 41 17-4, 22, 24/25, strstreambuf::xsputn 17-131 126, 136, 170, 185 17-4 string::insert 17-175, 197, struct 3-15 222 class versus 9-1 string::length 17-178, 199, default member access 9-1 225 initialization 8-18 string-literal 2-13 type specifier 7-12 17-4 structure 3-15, 9-1 string::operator+= tag -see class name 17-171/172, 195, 220 sub-object 1-4 string::operator= 17-171, subscripting 195 example 8-10 string::operator[] 17-178, explanation 8-10 199 operator 5-4, 13-10 string::put_at 17-177, 199 operator, overloaded string::remove 17-176, 197, 13-12 223 subsequence rule, string::replace 17-176/177, overloading 13-5 198, 223 subtraction string::reserve 17-179, 200 implementation dependency string::resize 17-178, 199, pointer 5-22 225 operator 5-21 string::rfind 17-180/181, suffix 201/202, 226 E 2-12 string::string 17-169/171 F 2-12 string::substr 17-185, 205, L 2-10, 12 227 U 2-10 strlen 17-126, 136, 170 f 2-12 strpbrk 17-25 l 2-10, 12 strrchr 17-25 u 2-10 strstr 17-25 summary 17-4, 123 compatibility with C C-1 strstreambuf::freeze 17-128 compatibility with ISO C strstreambuf::overflow C-3 17-129 scope rules 10-12 strstreambuf::pbackfail syntax A-1 17-130 switch strstreambuf::pcount 17-128 statement 6-2/3, 6 strstreambuf::seekoff statement, declaration in 17-132 6-4 strstreambuf::seekpos synchronization 17-58, 99, 17-133 118, 159 strstreambuf::setbuf 17-133 synonym 7-20 strstreambuf::str 17-128 type name as 7-7 strstreambuf::strstreambuf syntax 17-125/128 checking 14-4 strstreambuf::~strstreambuf class member 5-6 17-128 explicit instantiation strstreambuf::sync 17-133 14-11 strstreambuf::uflow 17-131 notation 1-3 strstreambuf::underflow summary A-1 17-131 strstreambuf::xsgetn 17-131 x X FO 5950 x X NP 650 42 Index DRAFT: 25 January 1994 T termination template 14-1 and destructor, program access rules 14-16 12-8 and < 14-3 program 3-10/11 and friend 14-24 terminator 0, string 2-13 and static member 14-25 terminology, pointer 3-16 and static variable 14-25 text mode 17-62 argument 14-16 this 5-2 argument deduction 14-19 anachronism, assignment to argument specification C-15 14-18 and constructor class 14-2, 17-118/120, anachronism C-15 208/209, 229, 231, 242 and destructor anachronism definition of 14-1 C-15 function 14-18 pointer -see this function overloading type of 9-10 resolution 14-18 throw 15-1 instantiation 14-9 throw-expression in linkage of 3-8 conditional-expression member function 14-23 5-26 name injection from 14-8 throw-expression 15-1 name lookup 14-3 throwing, exception 15-2 name resolution 14-3 throw-point 15-1 name, use of 14-5 17-4, 24 overload resolution 14-21 tmpfile 17-26 parameter, default 14-14 token 2-5, 7 specialization 14-12 token 2-5 type equivalence 14-18 translation template 14-1 phases 2-1 template-argument 14-2 separate 2-1 template-argument-list 14-2 unit 17-2, 5/6, 11/12 template-declaration 14-1 unit 2-2, 3-8 template-id 14-2 unit, name and 3-2 template-name 14-2 translation@unit 2-1 template-parameter 14-14 trigraph 2-1/2 template-parameter-list trivial conversions, 14-1 overloading resolution temporary 12-3 13-6 and declarator initializer trunc 17-55 12-4 truncation 4-2 and default argument 12-4 try 15-1 constructor for 12-3 try-block 15-1 destruction of 12-3 type 3-1 destructor for 12-3 Boolean 3-14 elimination of 12-3 ambiguity, declaration implementation dependency 7-2 generation of 12-3 arithmetic 3-15 order of destruction of array 3-15, 8-12 12-4 bitmask 17-20/21, 58, reference and 8-21 60/62, 124 scope of reference 8-22 char 3-14 terminate 17-41/42 character 3-14 terminate() 15-6/7 checking, argument 5-5 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 43 checking, extension to C name as synonym 7-7 C-1 name example 8-3 checking of default name example, nested 9-17 argument 8-14 name, nested 9-17 class and 9-1 name, scope of nested completely-defined object 9-17 3-13 of bit-field 9-14 compound 3-15 of character literal 2-11 const 7-8 of constructor 12-2 conversion -see also of conversion 12-5 conversion of delete 12-11 conversion, argument 12-4 of enum 7-13/14 conversion, explicit -see of floating point literal casting 2-12 conversion rules 4-2 of integer literal 2-10 declaration 8-5 of integer literal, declaration consistency implementation dependency 3-9 2-10 declaration, typedef as of new 12-10 7-7 of ptrdiff_t, definition, class name as implementation dependency 9-2 5-22 double 3-15 of size_t, implementation dynamic 1-2 dependency 5-16 enumerated 3-14, of sizeof expression, 17-19/20, 28, 58, 62 implementation dependency enumeration underlying 2-8 7-14 of static member 5-14, equivalence 7-7, 9-2 9-12 equivalence, template of string 2-13 14-18 of string literal 2-13 example of incomplete of this 9-10 3-13 pointer 3-15 extension to C reference polymorphic 10-7 C-1 short 3-14 extension to C user- signed char 3-14 defined C-2 specifier, char 7-10 float 3-15 specifier, class 7-12 floating point 3-14 specifier, double 7-10 function 3-15, 8-11/12 specifier, elaborated fundamental 3-14 14-17 generator -see template specifier, enum 7-11 implementation 17-19 specifier, float 7-10 implementation dependency specifier, int 7-10 sizeof 3-14 specifier, long 7-10 incomplete 3-13 specifier, short 7-10 incompletely-defined specifier, struct 7-12 object 3-13 specifier, union 7-12 int 3-14 specifier, unsigned 7-10 integral 3-14 specifier, void 7-10 long 3-14 specifier, volatile 7-10 long double 3-15 static 1-3 name 3-17, 8-2 unsigned 3-14 x X FO 5950 x X NP 650 44 Index DRAFT: 25 January 1994 unsigned char 3-14 plus operator 5-14/15 unsigned int 3-14 unary-expression 5-14 unsigned long 3-14 unary-operator 5-14 unsigned short 3-14 unbuffered file 17-164/165 void 3-15 #undef 16-9, 17-11 void* 3-16 undefined volatile 7-8 behavior 1-3 wchar_t 3-14 bound pointer to member wchar_t underlying 3-14 function C-15 typedef 3-17 change to string literal and long 7-3 2-13 and short 7-3 conversion out of range and signed 7-3 value 4-2 and unsigned 7-3 delete 5-19 as type declaration 7-7 deleted object 5-19 class name 7-8, 9-4 division by zero 5-1, 21 declaration 3-2 escape sequence 2-11 enum name 7-8 function call 5-10, 13 example 7-7 left shift 5-23 linkage of 3-8 member function call 9-10 overloading and 13-1 pointer comparison 5-22, redefinition 7-7 24 specifier 7-7 pure virtual function call typedef-name 7-7 10-12, 12-17 typeid 5-9 string literal type-id 8-2 concatenation 2-13 type-id-list 15-5 unrepresentable integral 17-4, 50 value 4-2 typeinfo::name 17-53 value delete 5-19 17-4 underlying typeinfo::operator!= 17-53 type, enumeration 7-14 typeinfo::operator= 17-53 type, wchar_t 3-14 typeinfo::operator== 17-52 underscore typeinfo::typeinfo 17-53 character 17-12 type-parameter 14-14 character _ 2-6 types, implementation in identifier _ 2-7 dependency range of 2-8 unexpected 17-42 type-specifier unexpected() 15-7 bool 7-10 ungetc 17-79, 84, 109, wchart 7-10 151/152, 159 type-specifier 7-8 uninitialized variable, indeterminate 8-18 union 3-15, 9-12 U access control, anonymous U suffix 2-10 9-13 u suffix 2-10 anonymous 9-13 unary class versus 9-1 expression 5-14 constructor 9-12 minus operator 5-14/15 default member access 9-1 operator 5-14 destructor 9-12 operator, interpretation extension to C anonymous of 13-11 C-2 operator, overloaded global anonymous 9-13 13-11 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 45 initialization 8-19, 9-13 use of template name 14-5 member function 9-12 user-defined restriction 9-13, 12-2 conversion 5-2, 12-4/5 restriction, anonymous conversion and name hiding 9-13 12-7 type specifier 7-12 conversion, implicit 12-6 unit, translation 17-2, conversion, inheritance of 5/6, 11/12 12-6 unitbuf 17-55 conversion, overloading unknown argument type 8-11 resolution and 13-7/8 unnamed conversion, virtual 12-6 bit-field 9-14 type, extension to C C-2 class 7-8 using-declaration 7-20 object 12-2 using-directive 7-24 parameter example 8-16 unqualified-id 5-3 unrepresentable integral V value, undefined 4-2 va_end 17-12 unreserved name 17-18 va_list 17-12 unsigned value arithmetic 3-14 call by 5-5 char type 3-14 delete, undefined 5-19 constant 2-9 new, unspecified 5-17 implementation dependency of char literal, signed 4-2 implementation dependency int type 3-14 2-12 integer conversion, signed of enumerator 7-14 4-1 of multicharacter literal, literal 2-9/10 implementation dependency long type 3-14 2-11 short type 3-14 undefined conversion out type 3-14 of range 4-2 type specifier 7-10 undefined unrepresentable typedef and 7-3 integral 4-2 unsigned-suffix 2-9 variable unspecified argument list 8-11 argument to constructor indeterminate 5-18 uninitialized 8-18 behavior 1-3 parameter list 5-5, 8-11 destructor call 6-8 parameter list example expression 5-6 8-13 order of argument template and static 14-25 evaluation 5-6 vertical tab 2-11 order of evaluation 5-1 virtual order of evaluation new base class 10-4 5-18 base class DAG 10-4 order of function call base class dominance 10-6 evaluation 5-6 base class initialization value new 5-17 12-15, 17 unwinding, stack 15-3 base class initialization, uppercase 17-12, 22, 55, order of 12-15 61, 72/73, 112 destructor 12-8 uppercase 17-55, 72/73 destructor, pure 12-8 x X FO 5950 x X NP 650 46 Index DRAFT: 25 January 1994 function 10-7 operand 5-2 function access 11-9 overloading and 13-1, 20 function call 10-11 pointer assignment 5-27 function call, constructor pointer initialization and 12-16 8-17 function call, destructor reference 8-21 and 12-16 type 7-8 function call, undefined type specifier 7-10 pure 10-12, 12-17 void* pointer conversion function definition 10-9 4-3 function definition, pure 10-11 function example 10-8/9 W function example, pure 17-4, 12, 23/24, 10-11 28, 194, 205 function, pure 10-11/12 wchart type-specifier 7-10 member function 17-15/17, wchar_t 2-11, 13, 17-23, 28 94 implementation dependency user-defined conversion 3-14 12-6 implementation dependency virtual promotion of 4-1 and friend 10-9 type 3-14 and multiple inheritance underlying type 3-14 10-9 wcslen 17-194 specifier 7-6 17-4, 12 visibility 3-6 WEOF 17-28 void while statement 6-4/5 parameter 8-11 white type 3-15 space 2-3 type specifier 7-10 space 2-5 void& 8-7 wide-character 2-11 void* string 2-13 conversion, pointer to string, null-terminated member 4-5 17-23 pointer comparison 5-23 wint_t 17-28 pointer conversion 4-3 wmemcmp 17-205 pointer type extension to ws 17-72/73, 100, 109 C C-2 17-4, 189 type 3-16 wstring::append 17-195/196 volatile 3-16 wstring::assign 17-196 assignment, pointer to wstring::compare 17-205 5-27 wstring::copy 17-200 const void* pointer wstring::c_wcs 17-199 conversion 4-3 wstring::find 17-200/201 constructor and 9-10, wstring::find_first_not_of 12-1 17-203/204 destructor and 9-10, 12-7 wstring::find_first_of extension to C C-2 17-202 implementation dependency wstring::find_last_not_of 7-10 17-204 initialization, pointer to wstring::find_last_of 8-17 17-202/203 member function 9-10 wstring::get_at 17-198 x X FO 5950 x X NP 650 DRAFT: 25 January 1994 Index 47 wstring::insert 17-197 pointer conversion 4-4 wstring::length 17-199 undefined division by 17-4 5-1, 21 wstring::operator+= 17-195 width of bit-field 9-14 wstring::operator= 17-195 wstring::operator[] 17-199 wstring::put_at 17-199 wstring::remove 17-197 wstring::replace 17-198 wstring::reserve 17-200 wstring::resize 17-199 wstring::rfind 17-201/202 wstring::substr 17-205 wstring::wstring 17-193/194 X xalloc::do_raise 17-44 xalloc::xalloc 17-44 xalloc::~xalloc 17-44 xdomain::do_raise 17-39 xdomain::xdomain 17-39 xdomain::~xdomain 17-39 xlogic::do_raise 17-33 xlogic::xlogic 17-33 xlogic::~xlogic 17-33 xmsg::do_raise 17-32/40, 44, 51, 60 xmsg::raise 17-31 xmsg::raise_handler 17-31 xmsg::set_raise_handler 17-31 xmsg::what 17-31 xmsg::where 17-32 xmsg::why 17-32 xmsg::xmsg 17-31/32 xmsg::~xmsg 17-31 xrange::do_raise 17-40 xrange::xrange 17-40 xrange::~xrange 17-40 xruntime::do_raise 17-34 xruntime::xruntime 17-34 xruntime::~xruntime 17-34 X(X&) -see copy constructor Z zero assignment to pointer 5-27 assignment to pointer to member 5-27 pointer 4-3, 5, 5-23