📄 indextxt.htm
字号:
choices for passing M68destructors and M45disadvantages M44efficiency M63, M65, M78-M80iostreams and E228leading to unused objects E135mandatory copying M62-M63modifying throw expressions M63motivation M44operator new and M52optimization M64recent revisions to M277rethrowing M64specifications, see exception specificationsstandard E231, M66, M70type conversions and M66-M67unexpected, see unexpected exceptionsuse of copy constructor M63use to indicate common conditions M80virtual functions and M79vs. setjmp and longjmp M45explicit E67, E78, E85, M28-M31, M227, M294see also example usesexplicit qualification of names E30, E162see also namespacesvirtual functions and E196extent, of class E59extern "C" M272-M273F facets, in standard C++ library E230factory functions E149, E201fake this M89false E9, M3Felix the Cat M123fetch and increment M32fetching, lazy M87-M90field delimiters, implemented via virtual functions E202Fields, Lorri Mxvfind algorithm E184, E230, M283first fit M67fixed-format I/O M112Fleming, Read Exix, Mxiii<float.h> E107for_each algorithm E230formatting, in iostreams E229forms for new casts E10 -E11Forth M271FORTRAN E17, E61, E231, M213, M215, M271, M288forwarding functions E148Franklin, Dan Exviiifree M42, M275combining with delete E20destructors and E19-E20free implementation of Standard Template Library (STL) M4French, Donald Exvii, MxvFrench, gratuitous use of E149, E220, M177, M185friend functions E87-E88interfaces and E83friends, avoiding M108, M131friendship, in real life E87Frohman, Scott Exixfstream class M278FTP site for More Effective C++ M8see also Web sitesFUDGE_FACTOR E15fully constructed objects M52function callsmechanics of E132returning a result from E132semantics of M35-M36functional abstraction E89-E90functionssee also function calls, inline functions, virtual functionsadding at runtime M287C, and name mangling M271callback M74-M75, M79declaring E4defining E4deliberately not defining E116factory E149, E201for type conversions M25, M31forwarding E148friend, see friend functionsglobal vs. member E84-E87implicitly generated E212-E216lifetime of return values E127-E128member template, see member templatesmember, see member functionsnonvirtual, meaning E167, E211references to E121return types, see return typesreturn values, modifying E94simple virtual, meaning E211static, via inlining E139type conversions and E86virtual, see virtual functionsfuture tense programming M252-M258G Gajdos, Larry ExviiiGamma, Erich M288, M289garbage collection M183, M212generalizing code M258generic (void*) pointers E110, E189, E191 -E194private inheritance and E193type safety and E192German, gratuitous use of M31Gibson, Paul Exixglobal functions, vs. member functions E84 -E87global overloading of operator new/delete M43, M153goddess, see Urbano, Nancy L.Gokul, Chandrika ExixGootman, Alexander ExviiiGUI systems M49, M74, M75Guzikowski, Chris MxvH halting problem E221Hamlet, allusion to E133, M22, M70, M252Hamlet, quotation from E11Handle/Body classes E146-E149handlesdangling E128object lifetimes and E127-E128to inaccessible members E124, E126Hansen, Tony ExixHarrington, John Exixhas-a relationship, definition (English) E182hash tables, standard C++ library and E229Hastings, Battle of E154head scratching, avoiding E89header filessee also headersinlining and E138length, and compilation speed E80name conflicts and E117standard names E225-E226vs. namespaces E119headerssee also header files<assert.h> E26<cassert> E26<complex> E225<complex.h> E225<cstdio> E225, E226<cstdlib> E127<cstring> E225, E226<float.h> E107<iomanip> M111<iostream> E225, E226<iostream> vs. <iostream.h> E19<iostream.h> E225<limits> E107<limits.h> E107, E225<math> M65<math.h> M65<new> E27, M40<new.h> M40<stdio.h> E17-E18, E225, E226<stdlib.h> E127<string> E226<string.h> E20, E225, E226heap objects, see objectsHelm, Richard M288, M289Hennessy, John L. Mxiheuristic for vtbl generation M115hiding class implementations E146-E152hit rate, cache, inlining and E137Hobbs, Bryan MxivHoeren, Gerd MxiiiHorstmann, Cay Mxiii, MxivHuchital, Jill Exix, MxiiiI identifying abstractions M267, M268identity, see object identityidioms M123if statementsdefining variables in E181vs. virtual functions E176#ifdef E16#ifndef E16Iliad, Homer's M87implementationof + in terms of +=, etc. M107of libraries M288of multiple dispatch M230-M251of operators ++ and -- M34of pass-by-reference M242of pure virtual functions M265of references M242of RTTI M120-M121of virtual base classes M118-M120of virtual functions M113-M118implementationsdecoupling from interfaces E164default, danger of E163-E167hiding E146-E152inheritance of E161-E169of derived class constructors and destructors E141of Protocol classes E151implicit conversions, see type conversionsimplicit type conversion operators, see type conversion operatorsimplicit type conversions, see type conversionsimplicitly generated functions E212-E216importing namespace elements E118-E119#include directives E16compilation dependencies and E144, E148include files, see header filesincorrect code, efficiency and E101, E124, E129, E131increment and fetch M32increment operator, see operator++indexing, arrayinheritance and M17-M18pointer arithmetic and M17infinite loop, in operator new E35inheritancesee also multiple inheritance, public inheritance, private inheritanceabstract classes and M258-M270accessibility restrictions and E115accidental E164-E165advantages of E164catch clauses and M67combining with templates E31-E33, E193common features and E164, E208concrete classes and M258-M270copy constructors and E71delete and M18emulated vtbls and M248-M249intuition and E156-E160libraries and M269-M270mathematics and E160nested classes and M197of implementation E161-E169of interface E161-E169of interface vs. implementation E161-E169operator delete and M158operator new and E35-E36, M158operator= and E69-E70penguins and birds and E156-E158private constructors and destructors and M137, M146protected E156public, see public inheritancerectangles and squares and E158-E160redefining nonvirtual functions and E169-E171sharing features and E164, E208smart pointers and M163, M173-M179type conversions of exceptions and M66vs. templates E185-E189when to use E189initializationsee also initialization orderdefinition (English) E8demand-paged M88of arrays via placement new M20-M21of const pointer members M55-M56of const static members E14, M140of emulated vtbls M239-M244, M249-M251of function statics M133of members, see member initializationof objects E8, M39, M237of pointers M10of references M10of static members E14, E29, E57, E58, M140of static objects inside functions E222of static pointers to null E43static M273-M275via memberwise copy E213virtual bases and E200vs. assignment E8-E9, E136for built-in types E56maintenance and E55with vs. without arguments E136initialization orderimportance of E221in a hierarchy E58of non-local static objects E18, E221-E223, M133inline functionssee also inliningaddress of E140as hint to compiler E138code replication and E139code size and E137debuggers and E142in More Effective C++ M7optimizing compilers and E137recursion and E138that aren't inlined E138-E139, E223thrashing and E137treated as static E139vs. #define E15-E16vs. macros, efficiency and E16inlining E137-E143see also inline functionsarchitecture-dependence of E143compiler warnings and E143constructors/destructors and E140-E142dynamic linking and E142function statics and M134Handle classes and E152header files and E138in More Effective C++ M7inheritance and E140-E142library design and E142Protocol classes and E152recompiling and E142relinking and E142return value optimization and M104virtual functions and E138"virtual" non-member functions and M129vtbl generation and M115when not done E138inner products E231insomnia E154instantiations, of templates M7INT_MIN E107integral members, initialization when static and const E14integral types E15interface classes E192efficiency of E194interfacescomplete E79, E184decoupling from implementations E164design considerations E77-E78design example E81-E83friend functions and E83in Java E200inheritance of E161-E169minimal E79-E81, E184type-safe E192-E194vs. implementations E144internal linkage M134International Standard for Information Systems Programming Language C++ E234internationalizationstandard C++ library and E230standard iostreams and E228Internet Engineering Task Force, The ExxInternet sites, see Web sitesinvalid_argument class M66invariants over specialization E167iostream class M278iostreams E17-E18, M280conversion to void* M168exceptions and E228fixed-format I/O and M112in standard C++ library E226, E228internationalization and E228<iostream>vs. <iostream.h> E19<iostream> header E225, E226<iostream.h> header E225operator! and M170standard vs. traditional E228vs. stdio E17-E18, M110-M112isa relationship, definition (English) E155is-implemented-in-terms-of relationship E182, E190, E193, E194, E208definition (English) E183ISO/ANSI standardization committee M2, M59, M96, M256, M277ISO/IEC JTC1/SC22/WG21 E234istream typedef E226iterators E184, M283see also Standard Template Libraryexample use E175, E176, E178, E179, E180, E181, E184in standard library E232operator-> and M96vs. pointers M282, M284J Jackson, Jeff MxivJapanese, gratuitous use of M45Java E47, E146, E195interfaces in E200Johnson, Ralph M288, M289Johnson, Tim Exix, Mxiii, MxvK Kaelbling, Mike Exviii, ExixKanze, James Mxii, MxiiiKernighan, Brian Exviii, Exix, Mxi, Mxii, Mxiii, M36Kimura, Junichi ExixKing, Stephen E127Kini, Natraj ExixKirk, Captain, allusion to M79Kirman, Jak ExixKlingon E97Knauss, Frieder ExixKnuth, Donald ExvKoenig, Andrew MxiiKoffman, Dawn ExixKreft, Klaus Exviii, MxiiiKhl, Dietmar ExviiKuhlins, Stefan ExixKuplinsky, Julio ExviiiL Lakos, John Exviii, ExixLanger, Angelika ExviiiLanglois, Lana Exx, Mxivlanguage lawyers M290languages, other, compatibility with E61Large-Scale C++ Software Design ExviiiLatin, gratuitous use of M203, M252layering E182-E185compilation dependencies and E185meanings of E182, E211vs. private inheritance E190-E194lazy construction M88-M90lazy evaluation M85-M93, M94, M191, M219conversion from eager M93object dependencies and M92when appropriate M93, M98lazy fetching M87-M90Lea, Doug Exvii, Exixleaksmemory, see memory leaksresource, see resource leaksLehrer, Tom, allusion to E3, E58Lejter, Moises Exixlemur, ring-tailed E203length_error class M66Lewandowski, Scott Exixlhs, as parameter name E11, M6librariesdesign and implementation M110, M113, M284, M288exception specifications and M75, M76, M79impact of modification M235inheriting from M269-M270iostream E17-E18, E228multiple inheritance and E198potential ambiguity and E114, E116standard, for C E18, E28, E224, E226, E228, E230standard, for C++, see standard C++ libraryLiebelson, Jerry Exixlifetimeof function return values E127-E128of temporary objects M278limitations on type conversion sequences M29, M31, M172, M175, M226limiting object instantiations M130-M145<limits> E107<limits.h> E107, E225linkageC M272internal M134linkers, and overloading M271link-time errors E14, E64, E117, E139, E219vs. runtime errors E216lint-like programs for C++ ExiiiLinton, Mark ExviiiLISP E65, E195, E216, M93, M230, M271list template E174, E183, E184, E229, M4, M51, M124, M125, M154, M283local objectsconstruction and destruction E131static E222locales, in standard C++ library E230locality of reference M96, M97localization, support in standard C++ library M278logic_error class E135, E231, M66long int, as NULL E111longjmpdestructors and M47setjmp and, vs. exceptions M45Love-Jensen, John ExixLSD M287Lutz, Greg Exixlvalue, definition M217lying to compilers M241M Madagascar E204see also lemur, ring-tailedmagazinesC Users Journal MxiiiC++ Report Exvii, Exviii, Mxii, Mxiii, Mxv, M287, M289C/C++ Users Journal Exviii, Mxiii, M289recommended M289magic numbers E108main M251, M273, M274maintenance M57, M91, M107, M179, M211, M227, M253, M267, M270, M273adding class members and E24common base classes and E164downcasting and E176large class interfaces and E80member initialization lists and E55references to functions and E120RTTI and M232the lure of multiple inheritance and E209make_pair template M247malloc M39, M42, M275combining with new E20constructors and E19-E20, M39operator new and M39Mangoba, Randy Exix
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -