bjarne_stroustrup_s_c_plus_plus_glossary

Bjarne Stroustrup's C++ Glossary

C++: C++ Fundamentals, C++ Inventor - C++ Language Designer: Bjarne Stroustrup in 1985; C++ Keywords, C++ Built-In Data Types, C++ Data Structures (CPP Containers) - C++ Algorithms, C++ Syntax, C++ OOP - C++ Design Patterns, Clean C++ - C++ Style Guide, C++ Best Practices ( C++ Core Guidelines (CG)) - C++ BDD, C++ Standards ( C++ 23, C++ 20, C++ 17, C++ 14, C++ 11, C++ 03, C++ 98), Bjarne Stroustrup's C++ Glossary, CppReference.com, CPlusPlus.com, ISOcpp.org, C++ Compilers (Compiler Explorer, MinGW), C++ IDEs, C++ Development Tools, C++ Linter, C++ Debugging, C++ Modules ( C++20), C++ Packages, C++ Package Manager ( Conan - the C/C++ Package Manager), C++ Standard Library, C++ Libraries, C++ Frameworks, C++ DevOps - C++ SRE, C++ CI/CD ( C++ Build Pipeline), C++ Data Science - C++ DataOps, C++ Machine Learning, C++ Deep Learning, Functional C++, C++ Concurrency, C++ History, C++ Topics, C++ Bibliography, Manning C++ Series, C++ Courses, CppCon, C++ Research, C++ GitHub, Written in C++, C++ Popularity, C++ Awesome , C++ Versions. (navbar_cplusplus – see also navbar_cpp_containers, navbar_cppcon, navbar_cpp_core_guidelines, navbar_cpp23, navbar_cpp20, navbar_cpp17, navbar_cpp14, navbar_cpp11)

Bjarne Stroustrup's C++ Glossary

Fair Use Source: BSCppG 2012, Bjarne Stroustrup's C++ Glossary

Bjarne Stroustrup's C++ Glossary

Modified October 3, 2012

This is a glossary of C++ terms, organized alphabetically by concept.

“The definitions/explanations of individual C plus plus terms are necessarily very brief. To compensate, each entry includes one or more references to TC++PL)]] where you can find more comprehensive explanations and C plus plus code examples. I use section references, rather than page numbers, so that this C plus plus glossary can be used together with translations of my C plus plus books. It is always wise to read a whole section rather than trying to glean information from a few semi-random sentences.” (BSCppG 2012)

“For people interested in the reasons behind the design of C++, most entries also refer to The Design and Evolution of C++ ([[D&E)]]. Some entries contain links other parts of my home pages, especially to my C plus plus FAQ and C++ Style and Technique FAQ. If I find the time, I'll add references to the C plus plus ISO standard.” (BSCppG 2012)

“This glossary is specifically “C++ oriented”. That is, it defines terms in the context of C++. For example, it defines C plus plus generic programming in terms of C plus plus templates and C plus plus object-oriented programming in terms of C plus plus virtual functions, rather than trying to be sufficiently abstract and general to cover all languages and all usages.” (BSCppG 2012)

The entries are meant to be brief explanations, rather than precise C plus plus definitions. (BSCppG 2012)

Suggestions for improved explanations, C plus plus terms to add, or anything else that would make the glossary of C plus plus more useful, are most welcome: bs at cs dot tamu dot edu. (BSCppG 2012)

Glossary

A

B

  • C plus plus C++ standards committees - the ISO committee for C++ (WG21) and the various national standards committees that closely cooperate with it (BIS, AFNOR, DIN, etc.). Did the ANSI/ISO standards committee spoil C++?. See also: C++ Standard. D&E 6.2. (BSCppG 2012)
  • C plus plus C++03 - name for the minor revision of the C++ standard represented by the 2003 corrigenda (“a bug fix release”). (BSCppG 2012)
  • C plus plus C++0x - the upcoming revision of the ISO C++ standard; 'x' is scheduled to be '9'. See my publicatons page. (BSCppG 2012)
  • C-style cast - dangerous form of explicit type conversion; prefer new-style cast if you must use explicit type conversion. TC++PL 6.2.7, D&E 14.3.5.1. (BSCppG 2012)
  • C-style string - zero-terminated array of characters, supported by C standard library functions. A low-level and error-prone mechanism; where possible prefer strings. TC++PL 3.5.1, 20.3.7, 20.4. (BSCppG 2012)
  • C plus plus C/C++ - (1) an abbreviation used when discussing similarities, differences, and compatibility issues of C and C++. (2) a mythical language referred to by people who cannot or do not want to recognize the magnitude of differences between the facilities offered by C and C++ or the significant differences in the programming styles supported by the two language. See also: multi-paradigm programming, object-oriented programming, generic programming, exception, template, user-defined type, C++ standard library. (BSCppG 2012)
  • C plus plus C/C++ compatibility - C++ was designed to be as compatible as possible to C, but no more. This basically means as compatible as can be without compromising C++'s level of type safety. You can download Appendix B of TC++PL,. Compatibility, which describes incompatibilities and differences in facilities offered by C and C++. TC++PL B. D&E 2.7, 3.12, 4.5. (BSCppG 2012)
  • C plus plus C89 - The 1989 ANSI standard for C based on K&R C with a few additions borrowed from C++, such as function prototypes and const. See also: K&R C, C99. (BSCppG 2012)
  • C plus plus C99 - The 1999 ISO standard for C based on C89 with additions to support Fortran-style numeric computation. It also borrows a few more features, such as line comments (// comments) and declarations as statements, from C++. (BSCppG 2012)
  • C plus plus call-by-value - passing a copy of an argument to the called function. The semantics of function call is to pass a copy of an argument. The copy operation is defined by the argument type's copy constructor. See Also: call-by-reference. TC++PL 7.2. (BSCppG 2012)
  • C plus plus cast - operator for explicit type conversion; most often best avoided. See also dynamic_cast, C-style cast, new-style cast. TC++PL 6.2.7, D&E 7.2, 14.2.2.1. (BSCppG 2012)
  • C plus plus char* - pointer to a char or an array of char. Typically assumed to point to a C-style string. Prefer a standard library string over a C-style string when you can. TC++PL 2.3.3, 13.5.2. (BSCppG 2012)
  • C plus plus character set - a set of integer values with a mapping to character representations; for example, ASCII (ANSI13.4-1968) gives meaning to the values 0-127. ASCII is C++'s representation character set, the character set used to represent program source text. TC++PL C.3. D&E 6.5.3. (BSCppG 2012)
  • C plus plus class - a user-defined type. A class can have member functions, member data, member constants, and member types. A class is thee primary mechanism for representing concepts in C++. See also: template class. TC++PL 2.5.2, 10, D&E 2.3. (BSCppG 2012)
  • C plus plus clone - a function that makes a copy of an object; usually a clone function relies on run-time information (e.g. a virtual function call) to correctly copy an object given only a pointer or reference to a sub-object. (BSCppG 2012)
  • C plus plus closure - object representing a context. C++ does not have general closures, but function objects can be efficiently used to hold specific parts of a context relevant to a computation. TC++PL 22.4.7, 18.4. (BSCppG 2012)
  • C plus plus compiler - the part of a C++ implementation that produces object code from a translation unit. See also: front-end, back-end. (BSCppG 2012)
  • C plus plus concrete type - a type without virtual functions, so that objects of the type can be allocated on the stack and manipulated directly (without a need to use pointers or references to allow the possibility for derived classes). Often, small self-contained classes. See also abstract class, vector, list, string, complex. TC++PL 25.2. (BSCppG 2012)
  • C plus plus constraint - rule that restricts the set of acceptable arguments for a template parameter. For example “the argument must have + and - operators”. Examples. D&E 15.4. (BSCppG 2012)
  • C plus plus constructor - member function with the same name as its class, used to initialize objects of its class. Often used to establish an invariant for the class. Often used to acquire resources. A constructor establishes a local environment in which member functions execute. See also: order of construction, destructor. TC++PL 10.2.3, D&E 2.11.1. (BSCppG 2012)
  • C plus plus container - (1) object that holds other objects. (2) type of object that holds other objects. (3) template that generates types of objects that hold other objects. (4) standard library template such as vector, list, and map. TC++PL 16.2, 16.2.3, 17, D&E 15.3. (BSCppG 2012)
  • C plus plus controlled variable - a variable used to express the part of the exit condition of a loop that varies each time around the loop. For example ``i in for (int i=0; i<max; ++i) f(i); (BSCppG 2012)
  • C plus plus conversion operator - operator function specifying a conversion from a user-defined type to either another user-defined type or a built-in type. Note that constructors cannot define conversions to built-in types. TC++PL 11.4, D&E 3.6.3. (BSCppG 2012)
  • C plus plus copy assignment - an assignment accepting an object of the class itself as its argument, typically Z::operator=(const Z&). A copy assignment is used for assignment of an object of type T with an object of type T. If a copy assignment is not declared for a class, memberwise copy is used. See also: copy constructor. TC++PL 10.4.4.1, 10.4.6.3 D&E 11.4. (BSCppG 2012)
  • C plus plus copy constructor - a constructor accepting an object of the class itself as its argument, typically Z::Z(const Z&). A copy constructor is used for initialization of objects of type T with objects of type T. If a copy constructor is not declared for a class, memberwise initialization is used. See also: call-by-value, argument passing, value return, copy assignment. TC++PL 10.4.4.1, 10.4.6.3, D&E 11.4. (BSCppG 2012)
  • C plus plus Currying - producing a function of N-M arguments by specifying M arguments for a function of N arguments. See also: binder, default argument. TC++PL 18.4.4.1. (BSCppG 2012)

D

  • C plus plus declaration - an introduction of a name into a scope. The type of the name must be specified. If the declaration also specifies the entity to which the name refers, the declaration is also a definition. TC++PL 4.9, D&E 3.11.5. (BSCppG 2012)
  • C plus plus decltype - C++ox operator meaning the type of its operand. For example: const double& d1 =2.0; decltype(d1) d2; (d2 will also be a const double&). Primarily useful for writing forwarding functions in generic programming. (BSCppG 2012)
  • C plus plus default argument - a value specified for an argument in a function declaration, to be used if a call of the function doesn't specify a value for that argument. This is commonly used to allow a simple interface for common uses while making it easy to use less common facilities by specifying more arguments. See also: default template argument, binder. TC++PL 7.5, 10.2.3, D&E 2.12.2. (BSCppG 2012)
  • C plus plus default template argument - a type or value specified for an argument in a template declaration, to be used if a use of the template doesn't provide a type or value for that argument. This is commonly used to allow a simple interface for common uses while making it easy to use less common facilities by specifying more arguments. See also: default argument. TC++PL 13.4.1, B.3.5. (BSCppG 2012)
  • C plus plus definition - a declaration that specifies the entity to which the declared name refers. See also: one definition rule, variable definition, const definition, template definition, function definition. TC++PL 4.9, D&E 15.11.3. (BSCppG 2012)
  • C plus plus delete - object destruction operator. Invokes destructor, if any. See also: resource management, memory management, garbage collection, operator delete(). TC++PL 6.2.6, D&E 2.3, 10.2. (BSCppG 2012)
  • C plus plus deprecated feature - feature left in a programming language for historical reasons only. The standard s committee recommends against its use and warns that it may be removed in future revisions of the standard. (BSCppG 2012)
  • C plus plus deque - double-ended queue (pronounced “deck”). A standard library template alowing insertions and deletions at both ends. Use a vector if you need insertions and deletions only at one end (as is typical). Use a list if you need frequent insertions and deletions in the middle. TC++PL 17.2.3. (BSCppG 2012)
  • C plus plus destructor - member of a class used to clean up before deleting an object. It's name is its class' name prefixed by '~'. For example, Foo's destructor is ~Foo(). Often used to release resources. A destructor is implicitly called whenever an object goes out of scope or is deleted. See also: virtual destructor, order of destruction. TC++PL 10.4.2, D&E 2.11.1, 3.11.2. (BSCppG 2012)
  • C plus plus digraph - alternative representation for C++ representation characters that doesn't exist in every national character set, such as {, }, [, ], and #: <%, %., <:, :>, and %:. TC++PL C.3.1. (BSCppG 2012)
  • C plus plus downcast - a cast from a base class to one of its derived classes. The name reflects the fact that in programming, trees tend to be drawn growing downwards from the roots. See also: dynamic_cast, upcast, crosscast. TC++PL 15.4. (BSCppG 2012)
  • C plus plus dynamic_cast - a type conversion operation that performs safe conversions using on run time type information. Used for navigation of a class hierarchy. See also: downcast, crosscast, static_cast. TC++PL 15.4.1, D&E 14.2.2, 14.3.2.1. (BSCppG 2012)

E

  • C plus plus encapsulation - the enforcement of abstraction by mechanisms that prevent access to implementation details of an object or a group of objects except through a well-defined interface. C++ enforces encapsulation of private and proteced members of a class as long as users do not violate the type system using casts. See also: interface and access control. TC++PL 15.3, 24.3.7.4, D&E 2.10. (BSCppG 2012)
  • C plus plus escape character - the character \, also called backslash, sed an initial character in representations of characters that cannot be represented by a single ASCII character, such as newline ('\n') and horizontal tab ('\t'). TC++PL C.3.2. (BSCppG 2012)
  • C plus plus exception - object thrown by a throw-statement and (potentially) caught by an exception handler associated by a try-block. See also: exception safety, termination semantics, catch. TC++PL 8.3, 14.2, D&E 16. (BSCppG 2012)
  • C plus plus exception handling - the primary way of reporting an error that cannot be handled locally. An exception is thrown and will be caught by an exception handler or terminate() will be called. See also: exception safety, termination semantics, try-block, throw, catch. TC++PL 8.3, 14, E, D&E 16. (BSCppG 2012)
  • C plus plus exception safety - the notion that a program is structured so that throwing an exception doesn't cause unintended side effects. See also: basic guarantee, strong guarantee, and nothrow guarantee. You can download Appendix E Standard-Library Exception Safety of TC++PL describing techniques for exception handling. TC++PL E.2. (BSCppG 2012)
  • C plus plus explicit call of destructor - destructors are implicitly called when an object goes out of scope or is deleted. However, if a user have taken over construction (using placement new) and destruction, a destructor must be explicitly called. Example. For example, explicit call of destructor is used in the implementation of standard library containers. See also: placement new. TC++PL 10.4.11, E.3.1, D&E 10.5.1. (BSCppG 2012)
  • C plus plus extern - a keyword used to indicate that the definition of an entity being declared is defined elsewhere. Because “extern: is only necessary for global variables it is largely redundant. (BSCppG 2012)

F

  • C plus plus file - a sequence of bytes or words holding information in a computer. The term “file” is usually reserved to information placed on disk or elsewhere outside the main memory. The iostream part of the C++ standard library provides ifstream, ofstream, and fstream as abstraction for accessing files. TC++PL 21.5. (BSCppG 2012)
  • C plus plus finally - a language construct supporting ad hoc cleanup in some languages. Similar, but not identical to C++'s catch(…). Use the “resource acquisition is initialization” technique instead. (BSCppG 2012)
  • C plus plus free store - memory allocated by new; also called dynamic memory. Often standard library facilities, such as vector, can be used to avoid explicit use of free store. TC++PL 6.2.6, 10.4.3, D&E 2.11.2, 11.4.2. (BSCppG 2012)
  • C plus plus friend function - a function declared as friend in a class so that it has the same access as the class' members without having to be within the scope of the class. And, no, friends do not “violate encapsulation”. TC++PL 11.5, 11.2.3, C.11.4, D&E 2.10, 3.6.1. (BSCppG 2012)
  • C plus plus front-end - the parts of a compiler that perform lexical and syntax checking, type checking, and initial semantic checking of a translation unit. Typically all compiler error messages comes from the front-end. See also: back-end. D&E 3.3. (BSCppG 2012)
  • C plus plus function - a named sequence of statements that can be invoked/called given arguments and that might return a value. The type of the function includes the number and types of argument and the type of the value returned, if any. See also: function declaration, function body. TC++PL 2.3, 7, D&E 2.6. (BSCppG 2012)
  • C plus plus function object - object with the application operator, operator()(), defined so that it can be called like a function. A function object is more general than a function because it can hold data and provide additional operations. Sometimes called a functor. Given current compiler technology, simple function objects inline better than pointers to functions, so that parameterization with function objects can be far more efficient than use of pointers to functions or virtual functions. See also: binder, adapter, inlining. Example. TC++PL 18.4. (BSCppG 2012)

G

  • C plus plus garbage collection - techniques for reclaiming unused memory without relying on user-supplied delete or free() commands. A permitted but not required technique for C++. Commercial and free garbage collectors exist for C++: See my C++ page. Use of classes that control their own storage, such as the standard library vector, string, and map, reduces the need for garbage collection. See also: resource acquisition is initialization, destructor. TC++PL C.9.1. D&E 10.7. (BSCppG 2012)
  • C plus plus general-purpose programming language - (1) a programming language intended for use in a wide range of application areas without restrictions that make it totally unsuitable for traditional major uses of computers, such as mathematical computations, data processing, text processing, graphics, and communications. (2) a language that can do what at least as much as other languages called “general purpose” can do. See also: C++. (BSCppG 2012)
  • C plus plus generic programming - programming using templates to express algorithms and data structures parameterized by data types, operations, and polices. See also: polymorphism, multi-paradigm programming. TC++PL 2.7, 24.4.1, D&E 15.11.2. (BSCppG 2012)
  • C plus plus global data - data defined in the global scope. This is usually best avoided because a programmer can't easily know what code manipulates it and how. It is therefore a common source of errors. Global constants are usually ok. (BSCppG 2012)
  • C plus plus global scope - the scope containing all names defined outside any function, class, or namespace. Names in the global scope can be prefixed by ::. For example, ::main(). TC++PL 2.9.4. (BSCppG 2012)
  • C plus plus glossary - “collection of glosses; lists and explanations of special words.”a - The Advanced Learners Dictionary of Current English. A pain to compile. (BSCppG 2012)
  • C plus plus grammar - a systematic description of the syntax of a language. The C++ grammar is large and rather messy. Some of the syntactic complexity was inherited from C. TC++PL A, D&E 2.8. (BSCppG 2012)
  • C plus plus GUI - Graphical User Interface. There are many C++ libraries and tools for building GUI-based applications, but no standard C++ GUI. (BSCppG 2012)
  • C plus plus handle - an object that controls access to another. Often, a handle also controls the acquisition and release of resources. A common use is for a handle to control access to a variably-sized data structure. See also: resource acquisition is initialization, vector, string, smart pointer. TC++PL 25.7, D&E 11.5.2. (BSCppG 2012)
  • C plus plus handle class - a small class that provides interface to an object of another class. A handle is the standard way of providing variable sized data structures in C++. Examples are string and vector. TC++PL 25.7. (BSCppG 2012)
  • C plus plus hash_map - hashed contained based on the standard library framework. Not (yet) part of the standard but very common in libraries based on the standard library. See also: map, vector, list. TC++PL 17.6. (BSCppG 2012)
  • C plus plus header file - file holding declarations used in more than one translation unit. Thus, a header file acts as an interface between separately compiled parts of a program. A header file often contains inline function definitions, const definitions, enumerations, and template definitions, but it cannot be #included from for than one source file if it contain non-inline function definitions or variable definitions. TC++PL 2.4.1, 9.2.1. D&E 2.5, 11.3.3. (BSCppG 2012)
  • C plus plus higher-order function - functions that produce other functions. C++ does not have general higher-order functions, but by returning function objects a function can efficiently emulate some techniques traditionally relying of higher-order functions. See also: binder. TC++PL 18.4.4. (BSCppG 2012)
  • C plus plus history of C++ - The work on what became C++ started by Bjarne Stroustrup in AT&T Bell Labs in 1979. The first commercial release was in 1985. Standards work stared in 1990 leading to ratification of the ISO standard in 1998. TC++PL 1.4. D&E Part 1. (BSCppG 2012)
  • C plus plus Hungarian notation - a coding convention that encodes type information in variable names. Its main use is to compensate for lack of type checking in weakly-typed or untyped languages. It is totally unsutable for C++ where it complicates maintenance and gets in the way of abstraction. (BSCppG 2012)

I

  • C plus plus IDE - Integrated (or Interactive) Development Enviornment. A software development environment (SDE) emphasizing a GUI interface centered around a source code editor. There are many IDEs for C++, but no standard SDE. (BSCppG 2012)
  • C plus plus implementation defined - an aspect of C++'s semantics that is defined for each implementation rather than specified in the standard for every implementation. An example is the size of an int (which must be at least 16 bits but can be longer). Avoid implementation defined behavior whenever possible. See also: undefined. TC++PL C.2. (BSCppG 2012)
  • C plus plus incomplete type - type that allows an object to be copied, but not otherwise used. A pointer to an undeclared type is the typical example of an incomplete type. (BSCppG 2012)
  • C plus plus initialization - giving an object an initial value. Initialization differs from assignment in that there is no previous value involved. Initialization is done by constructors. (BSCppG 2012)
  • C plus plus inline function - function declared inline using the inline keyword or by being a member function defined in-class. Compilers are encouraged to generate inline code rather than function calls for inline functions. Most benefits from inlining comes with very short functions. TC++PL 7.1.1, 9.2, 10.2.9, D&E 2.4.1 . (BSCppG 2012)
  • C plus plus inserter - (1) an iostream « (put to) function. (2) an STL operation yielding an iterator to be used for adding elements to a containter. TC++PL 19.2.4, 21.2, D&E 8.3.1. See also: extracter, back_inserter, front_inserter. (BSCppG 2012)
  • C plus plus interface - a set of declarations that defines how a part of a program can be accessed. The public members and the friends of a class defines that class' interface for other code to use. A class without data members defines a pure interface. The protected members provide an additional interface for use by members of derived classes. See also: abstract class. (BSCppG 2012)
  • C plus plus invariant - a condition of the representation of an object (the object's state) that should hold each time an interface function is called; usually established by a constructor TC++PL 24.3.7, E.3.5. (BSCppG 2012)
  • C plus plus iostream - (1) standard library flexible, extensible, type-safe input and output framework. (1) stream that can be used for both input and output. See also: file stream, string stream. TC++PL 3.4, 3.6, 21, D&E 3.11.4.1, 8.3.1. (BSCppG 2012)
  • C plus plus ISO - the international standards organization. It defines and maintains the standards of the major non-proprietary programming languages, notably C++. (BSCppG 2012)
  • C plus plus iteration - traversal of data structure, directly or indirectly using an iteration-statement. See also: recursion. The standard library offer algorithms, such as copy() and find(), that can be effective alternatives to explicit iteration. TC++PL 6.3.3. 18. (BSCppG 2012)

K

L

  • C plus plus language extension - (1) relatively new feature that people haven't yet gotten used to. (2) proposed new feature. (3) feature provided by one or more implementations, but not adopted by the standard; the use of some such features implies lock-in to a particular compiler supplier. (BSCppG 2012)
  • C plus plus learning C++ - focus on concepts and techniques. You don't need to learn C first. See also “Learning Standard C++ as a New Language”, available from my papers page. How do I start?. TC++PL 1.2, 1.7, D&E 7.2. (BSCppG 2012)
  • C plus plus Library TR - technical report from the ISO C++ standards committee defining a set of new standard library components, including regular expression matching (regexp), hashedcontainers (ordered_map), and smart pointers. See my C++ page. (BSCppG 2012)
  • C plus plus linker - the part of a C++ implementation that merge the code generated from separately compiled translation units into a program or part of a program. TC++PL 9.1, D&E 4.5, 11.3. (BSCppG 2012)
  • C plus plus literal - notation for values of bool, character types, integer types, or floating-point types. See also: enumerators. TC++PL 4.2, 4.3.1, 4.4.1, 4.5.1, 5.2.2, D&E 11.2.1. (BSCppG 2012)
  • C plus plus local class - class defined within a function. Most often, the use of a local class is a sign that a function is too large. Beware that a local class cannot be a valid template argument. (BSCppG 2012)
  • C plus plus local function - function defined within a function. Not supported by C++. Most often, the use of a local function is a sign that a function is too large. (BSCppG 2012)
  • C plus plus locale - standard library class for representing culture dependencies relating to input and output, such as floating-point output formats, character sets, and collating rules. A locale is a container of facets. TC++PL 21.1, D. (BSCppG 2012)
  • C plus plus loop - a statement that expresses the notion of doing something zero or more times, such as a for-statement and a while-statement. (BSCppG 2012)
  • C plus plus lvalue - an expression that may appear on the left-hand side of an assignment; for example, v[7] if v is an array or a vector. An lvalue is modifiable unless it is const. TC++PL 4.9.6, D&E 3.7.1. (BSCppG 2012)

M

  • C plus plus macro - facility for character substitution; doesn't obey C++ scope or type rules. C++ provides alternatives to most uses of macros; see template, inline, const, and namespace. Don't use macros unless you absolutely have to. TC++PL 7.8, D&E 2.9.2, 4.4, 18. (BSCppG 2012)
  • C plus plus maintenance - work on a program after its initial release. Typical maintenance activities include bug fixing, minor feature enhancements, porting to new systems, improvements of error handling, modification to use different natural languages, improvements to documentation, and performance tuning. Maintenance typically consumes more than 80% of the total effort and cost expended on a program. (BSCppG 2012)
  • C plus plus map - standard library associative container, based on “less than” ordering. See also: hash_map, vector, list. TC++PL 3.7.4, 17.4.1. (BSCppG 2012)
  • C plus plus Max Munch - (1) mythical participant in the C++ standards process. (2) the rule that says that while parsing C++ always chooses the lexically or syntactically longest alternative. Thus ++ is the increment operation, not two additions, and long int is a single integer type rather than the long integer followed by an int. Cross references in this glossary follow this rule. (BSCppG 2012)
  • C plus plus memberwise copy - copying a class object by copying each of its members in turn, using proper copy constructors or copy assignments. That's the default meaning of copy. TC++PL 10.4.4.1, 10.4.6.3, D&E 11.4.4. (BSCppG 2012)
  • C plus plus memory management - a way of allocating and freeing memory. In C++ memory is either static, allocated on the stack, or allocated on the free store. When people talk about memory management, they usually think of free store or even specifically about garbage collection. Memory can often be effectively managed through standard library containers, such as vector or string, or through general resource management techniques. See also: auto_ptr, constructor, destructor, resource acquisition is initialization. TC++PL C.9, D&E 3.9, 10. (BSCppG 2012)
  • C plus plus multi-paradigm programming - programming applying different styles of programming, such as object-oriented programming and generic programming where they are most appropriate. In particular, programming using combinations of different programming styles (paradigms) to express code more clearly than is possible using only one style. See also: C++. (BSCppG 2012)
  • C plus plus multiple inheritance - the use of more than one immediate base class for a derived class. One typical use is to have one base define an interface and another providing help for the implementation. TC++PL 12.2.4, 12.4, 15.2.5, D&E 12. (BSCppG 2012)

N

  • C plus plus name - sequence of letters and digits started by a letter, used to identify (“name”) user-defined entities in program text. An underscore is considered a letter. Names are case sensitive. The standard imposes no upper limit on the length of names. TC++PL 4.9.3. (BSCppG 2012)
  • C plus plus NCITS - National Committee for Information Technology Standards. The part of ANSI that deals with programming language standards, notably C++, and sells copies of the C++ standard. Formerly known as X3. (BSCppG 2012)
  • C plus plus new - object creation operator. See also: constructor, placement new, operator new(), resource management, memory management, garbage collection. TC++PL 6.2.6, 19.4.5, D&E 2.3, 10.2. (BSCppG 2012)
  • C plus plus new_handler - a (possibly user-defined) function called by new if operator new() fails to allocate sufficient memory. See also: std::bad_alloc exception. TC++PL 6.2.6.2, 14.4.5., 19.4.5. (BSCppG 2012)

O

  • C plus plus object - (1) a contiguous region of memory holding a value of some type. (2) a named or unnamed variable of some type; an object of a type with a constructor is not considered an object before the constructor has completed and is no longer considered an object once a destructor has started executing for it. Objects can be allocated in static memory, on the stack, on on the free store. TC++PL 4.9.6, 10.4, 10.4.3, D&E 2.3, 3.9. (BSCppG 2012)
  • C plus plus object-oriented programming - programming using class hierarchies and virtual functions to allow manipulation of objects of a variety of types through well-defined interfaces and allow a program to be extended incrementally through derivation. See also: polymorphism, data abstraction. TC++PL 2.6, 12, D&E 3.5, 7.2. (BSCppG 2012)
  • C plus plus object-oriented programming language - a programming language designed to support or enforce some notion of object-oriented programming. C++ supports OOP and other effective forms of programming, but does not try to enforce a single style of programming. See also: generic programming, multi-paradigm programming, hybrid language. (BSCppG 2012)
  • C plus plus one definition rule - there must be exactly one definition of each entity in a program. If more than one definition appears, say because of replication through header files, the meaning of all such duplicates must be identical. TC++PL 9.2.3, D&E 2.5, 15.10.2. (BSCppG 2012)
  • C plus plus operator - conventional notation for built-in operation, such as +, *, and &. A programmer can define meanings for operators for user-defined types. See also: operator overloading, unary operator, binary operator, ternary operator, prefix operator, postfix operator. TC++PL 6.2. (BSCppG 2012)
  • C plus plus operator overloading - having more than one operator with the same name in the same scope. Built-in operators, such as + and *, are overloaded for types such as int and float. Users can define their own additional meanings for user-defined types. It is not possible to define new operators or to give new meanings to operators for built-in types. The compiler picks the operator to be used based on argument types based overload resolution rules. See also: overload resolution. TC++PL 6.2, D&E 3.6, 11.7.1. (BSCppG 2012)
  • C plus plus optimizer - a part of a compiler that eliminates redundant operations from code and adjusts code to perform better on a given computer. See also, front-end, back-end, code generator. D&E 3.3.3. (BSCppG 2012)
  • C plus plus order of construction - a class object is constructed from the bottom up: first bases in declaration order, then members in declaration order, and finally the body of the constructor itself. TC++PL 10.4.6, 12.2.2, 15.2.4.1, 15.4.3. D&E 2.11.1, 13.2.4.2. (BSCppG 2012)
  • C plus plus overload resolution - a set of rules for selecting the best version of an operator based on the types of its operands. A set of rules for selecting the best version of an overloaded function based on the types of its arguments. The intent of the overload resolution rules is to reject ambiguous uses and to select the simplest function or operator for each use. TC++PL 6.2, D&E 11.2. (BSCppG 2012)
  • C plus plus overloading - having more than one function with the same name in the same scope or having more than one operator with the same name in the same scope. It is not possible to overload across different scopes. See also: using-declaration. TC++PL 6.2, D&E 3.6, 11.2. (BSCppG 2012)
  • C plus plus overriding - declaring a function in a derived class with the same name and a matching type as a virtual function in a base class. The argument types must match exactly. The return types must match exactly or be co-variant. The overriding function will be invoked when the virtual function is called. TC++PL 15.6.2, 6.2, D&E 3.5.2-3, 13.7. (BSCppG 2012)

P

  • C plus plus paradigm - pretentious and overused term for a way of thinking. Often used with the erroneous assumption that “paradigms” are mutually exclusive, and often assuming that one paradigm is inherently superior to all others. Derived from Kuhn's theory of science. TC++PL 2.2. (BSCppG 2012)
  • C plus plus parameter - a variable declared in a function or templates for representing an argument. Also called a formal argument. Similarly, for templates. (BSCppG 2012)
  • C plus plus Performance TR - technical report from the ISO C++ standards committee discussing issues related to perfoemance, especially as concerns embedded systems programming and hardware access. See my C++ page. (BSCppG 2012)
  • C plus plus placement new - a version of the new operator where the user can add arguments to guide allocation. The simplest form, where the object is placed in a specific location, is supported by the standard library. Example. For example, placement new is used in the implementation of standard library containers. See also: explicit call of destructor. TC++PL 10.4.11, E.3.1, D&E 10.4. (BSCppG 2012)
  • C plus plus POD - “Plain Old Data”]] - (roughly) a class that doesn't contain data members that would be illegal in C. A POD can therefore be used for data that needs to be share with C functions. A POD can have non-virtual member functions. (BSCppG 2012)
  • C plus plus policy object - an object used to specify guide decisions (e.g. the meaning of “less than”) or implementation details (e.g. how to access memory) for an object or an algorithm. See also trait, facet. TC++PL 13.4, 24.4.1. (BSCppG 2012)
  • C plus plus polymorphism - providing a single interface to entities of different types. virtual functions provide dynamic (run-time) polymorphism through an interface provided by a base class. Overloaded functions and templates provide static (compile-time) polymorphism. TC++PL 12.2.6, 13.6.1, D&E 2.9. (BSCppG 2012)
  • C plus plus preprocessor - the part of a C++ implementation that removes comments, performs macro substitution and #includes. Avoid using the preprocessor whenever possible. See also: macro, #include, inline, const, template, namespace. TC++PL 7.8, 9.2.1, D&E 18. (BSCppG 2012)
  • C plus plus programming language - artificial language for expressing concepts and general algorithms in a way that lends itself to solving problems using computers. There do not appear to be a general consensus on what a programming language is or should be. TC++PL 1.3.2, 2.1-2, D&E page 7. (BSCppG 2012)
  • C plus plus protected base - a base class declared protected in a derived class, so that the base's public and protected members are accessible only in that derived class and classes derived from that. TC++PL 15.3.2, D&E 13.9. (BSCppG 2012)
  • C plus plus pure object-oriented language - programming language claiming to support only object-oriented programming. C++ is designed to support several programming paradigms, including traditional C-style programming, data abstraction, object-oriented programming, and generic programming. For a longer explanation, read Why C++ isn't just an object-oriented programming language. See also: hybrid language. (BSCppG 2012)
  • C plus plus pure virtual function - virtual function that must be overridden in a derived class. Indicated by the curious =0 syntax. A pure virtual function can be defined in the class where it is declared pure, but needn't be and usually isn't. A class with at least one pure virtual function is an abstract class. TC++PL 12.3. D&E 13.2.1. (BSCppG 2012)
  • C plus plus push_back() - member function that adds an element at the end of a standard container, such as vector, thereby increasing the container's size by one. Example. TC++PL 3.7.3, 16.3.5, E.3.4. (BSCppG 2012)

Q

  • C plus plus qualified name - name qualified by the name of its enclosing class or namespace using the scope resolution operator ::. For example, std::vector or ::main. TC++PL 4.9.3, 8.2.1, 10.2.4, 15.2.1, 15.2.2, D&E 3.11.3. (BSCppG 2012)

R

  • C plus plus recursion - a function calling itself, hopefully with different arguments so that the recursion eventually ends with a call for which the function doesn't call itself. See also: iteration. TC++PL 7.1.1. (BSCppG 2012)
  • C plus plus reinterpret_cast - a type conversion operation that reinterprets the raw memory of an object as a value of another type. The result of a reinterpret_cast can only be portably used after being converted back into its original type. Use only as a last resort. See also: cast. TC++PL 6.2.7, D&E 14.3.3. (BSCppG 2012)
  • C plus plus resource - any entity that a program acquires and releases. Typical examples are free store, file handles, threads, sockets. See also: resource acquisition is initialization, exception safety, basic guarantee, resource management. TC++PL 14.4, E.2-3 D&E 16.5. (BSCppG 2012)
  • C plus plus resumption semantics - In some languages, but not C++, an exception handler can respond by telling the thrower to resume (``just carry on as if the problem hadn't happened”). This looks like a good idea in some cases, but in general leads to contorted code because of unfortunate dependencies between separate levels of abstraction. See also: termination semantics. TC++PL 14.4.5, D&E 16.6. (BSCppG 2012)
  • C plus plus rvalue - an expression that may appear on the right-hand side of an assignment, but not of the left-hand side; for example, 7. D&E 3.7.1. (BSCppG 2012)

S

  • C plus plus scope - a region of source text delimited by curly braces: { … }, a list of function or template parameters, or all of a translation unit outside other scopes. See also: block, namespace, global scope. TC++PL 2.9.4. (BSCppG 2012)
  • C plus plus SDE - Software Development Environment. An environment of editors, compilers, tools, libraries, etc. used by a programmer to produce software. There are many SDEs for C++, but no standard SDE. (BSCppG 2012)
  • C plus plus semantics - the rules specifying the meaning of a syntactically correct construct of a program. For example, specifying the actions taken to perform a for-statement or an object definition. (BSCppG 2012)
  • C plus plus separate compilation - the practice of compiling parts of a program, called translation units, separately and then later linking the results together using a linker. This is essential for larger programs. See also: linkage, header file, one definition rule. TC++PL 2.4.1, 9.1. D&E 2.5. (BSCppG 2012)
  • C plus plus sequence adapter - a class that provides a modified interface to another. For example, a standard library stack is an adapter for a more flexible data structure such as a vector. See also: adapter, stack, queue, priority_queue. TC++PL 17.3. (BSCppG 2012)
  • C plus plus sibling class - two classes are siblings if a class is (directly or indirectly) derived from them both and one is not derived from the other. Note that this is a rather inclusive definition of “sibling class” in that is does not require that the siblings have the same immediate derived class (I didn't want to introduce a notion of “cousin classes”). See also: dynamic_cast, crosscast. (BSCppG 2012)
  • C plus plus signature - the set of parameter types for a function; that is, the function's type ignoring its return type. This is a confusingly specialized definition compared to other programming languages where “signature” means “function type”. (BSCppG 2012)
  • C plus plus smart pointer - user-defined type providing operators like a function, such as * and ++, and with a semantics similar to pointers. See also: iterator. Sometimes smart a pointer is called a handle. TC++PL 11.10-11, 13.6.3.1, 19.3, 25.7, D&E 11.5.1 (BSCppG 2012)
  • C plus plus sort() - standard library algorithm for sorting a random access sequence, such as a vector or an array. Example comparing sort() to qsort(). TC++PL 18.7.1. (BSCppG 2012)
  • C plus plus standard library - The library defined in the C++ standard. Contains strings, stream I/O, a framework of containers and algorithms, support for numerical computation, support for internationalization, the C standard library, and some language support facilities. See also: complex, valarray, locale. TC++PL 16-22, D, E. (BSCppG 2012)
  • C plus plus statement - the basic unit controlling the execution flow in a function, such as if-statement, while-statement, do-statement, switch-statement, expression statement, and declaration. TC++PL 6.3. (BSCppG 2012)
  • C plus plus static - (1) keyword used to declare a class member static; meaning allocated in static memory. For a member function, this implies that there is no this pointer. (2) keyword used to specify that a local variable should be allocated in static memory. (3) deprecated: keyword used to specify that a global name should not be visible from other translation units. TC++PL 7.1.2, 10.2.4, 10.4.8-9. (BSCppG 2012)
  • C plus plus static_cast - a type conversion operation that converts between related types, such as pointer types within a class hierarchy and between enumerations and integral types. See also: cast, dynamic_cast. TC++PL 6.2.7, 15.4.2.1, D&E 14.3.2. (BSCppG 2012)
  • C plus plus STL - the “Standard Template Library” by Alex Stepanov, which became the basis for the containers, algorithms, and iterators part of the ISO C++ standard library. TC++PL 15-19. (BSCppG 2012)
  • C plus plus string - standard-library type representing a sequence of characters, support by convenient operators, such as == and +=. The general form of of strings, basic_string, supports strings of different kinds of characters. TC++PL 3.5, 20. (BSCppG 2012)
  • C plus plus strong guarantee - the guarantee that an exception thrown by an operation leaves every object in the state in which it was before the start of the operation. Builds on the basic guarantee. See also exception safety, nothrow guarantee, and basic guarantee. TC++PL E.2. (BSCppG 2012)
  • C plus plus struct - class with members public by default. Most often used for data structures without member functions or class invariants, as in C-style programming. TC++PL 5.7, 10.2.8, D&E 3.5.1. (BSCppG 2012)
  • C plus plus syntax - the set of gramatical rules specifying how the text of a program must be composed. For example, specifying the form of a declaration or the form of a for-statement. (BSCppG 2012) (BSCppG 2012)

T

  • C plus plus template - class or function parameterized by a set of types, values, or templates. See also template instantiation, specialization, template class, template function. TC++PL 2.7, 13, D&E 15. (BSCppG 2012)
  • C plus plus template class - class parameterized by types, values, or templates. The template arguments necessary to identify the class to be generated for the class template must be provided where a template class is used. For example “vector<int> v;” generates a vector of ints from the vector template. See also template. TC++PL 13.2, D&E 15.3. (BSCppG 2012)
  • C plus plus template function - function parameterized by types, values, or templates. The function to be generated from a template function can usually be deduced from the function arguments in a call. For example, “sort(b,e)” generates “sort<vector::iterator>(b,e)” from the sort() template function if b and e are standard library vector iterators. If a template argument cannot be deduced, it must be provided through explicit qualification. See also template. TC++PL 13,3, D&E 15.6. (BSCppG 2012)
  • C plus plus terminate() - If an exception is thrown but no handler is found, terminate() is called. By default, terminate() terminates the program. If program termination is unacceptable, a user can provide an alternative terminate() function. If you are worried about uncaught exceptions, make the body of main() a try-block. TC++PL 14.7. (BSCppG 2012)
  • C plus plus termination semantics - a somewhat ominous terminology for the idea that throwing an exception “terminates” an operation and returns through the function call chain to a handler. The handler can initiate any error handling it likes, including calling the function that caused the exception again (presumably after fixing the problem that caused the problem). What a handler can't do is simply tell the thrower to just carry on; by the time the handler is invoked we have returned from the block/function that threw and all blocks/functions that led to it from the handler's try-block. See also: resumption semantics. TC++PL 14.4.5, D&E 16.6. (BSCppG 2012)
  • C plus plus throw - operation for interrupting the normal flow of control and returning to an appropriate exception handler identifyed by the type of the exception throw. See also: catch, exception handling. TC++PL 8.3.1, 14.3, D&E 16.3. (BSCppG 2012)
  • C plus plus trait - a small policy object, typically used to describe aspects of a type. For example, iterator_trait specifies the types resulting from operations on an iterator T. TC++PL 19.2.2. (BSCppG 2012)
  • C plus plus trigraph - alternative representation for C++ representation characters that doesn't exist in every national character set, such as {, }, [, ], and #: ??<, ??>, ??(, ??), and ??=. TC++PL C.3.1. (BSCppG 2012)
  • C plus plus two-phase lookup - a somewhat complicated mechanism used in compilation of templates. Names that do not depend on a template parameter are looked up (and bound) early, i.e., when the template template definition is first seen (“phase 1 lookup”). Names that depend on a template parameter are looked up late, i.e. during template instantiation (“phase 2 lookup”) so that the lookup can find names relating to actual template arguments. TC++PL C::13.8. (BSCppG 2012)
  • C plus plus type checking - the process of checking that every expression is used according to its type. the compiler checks every expression based on the declared types of the names involved. TC++PL 7.2-3, 24.2.3, D&E 2.3, 2.6, 3.10, 3.15, 9.2.2.1. (BSCppG 2012)
  • C plus plus type conversion - producing a value of one type from a value of another type. A type conversion can be an implicit conversion or an explicit conversion. See also: user-defined type conversion, cast. TC++PL 6.2.7. (BSCppG 2012)
  • C plus plus type safety - the property that an object can be accessed only according to its definition. C++ approximates this ideal. A programmer can violate type safety by explicitly using a cast, by using an uninitialized variable, by using a pointer that doesn't point to an object, by accessing beyond the end of an array, and by misusing a union. For low-level systems code, it can be necessary to violate type safety (e.g. to write out the byte representation of some objects), but generally type safety must be preserved for a program to be correct and maintainable. (BSCppG 2012)
  • C plus plus typename - (1) an alternative to “class” when declaring template arguments; for example, “template<typename T> void f(T);” (2) a way of telling a compiler that a name is meant to name a type in template code; for example “template<class T> void f(T a) { typename T::diff_type x = 0; … }”. TC++PL C::13.5. (BSCppG 2012)

U

  • C plus plus undefined - an aspect of C++'s semantics for which no reasonable behavior is required. An example is dereferencing a pointer with the value zero. Avoid undefined behavior. See also: implementation defined. TC++PL C.2. (BSCppG 2012)
  • C plus plus union - a struct with all members allocated at the same offset within an object. The language does not guarantee type safety for all uses of unions. Primarily used to save space. TC++PL C.8.2. (BSCppG 2012)
  • C plus plus using-declaration - declaration of a local synonym for a name in another namespace or class. Example of using-declaration used to simplify overloading. See also: overloading, argument-based lookup. TC++PL 8.2.2. D&E 17.4. (BSCppG 2012)

V

  • C plus plus vector - standard library template providing contiguous storage, re-sizing and the useful push_back() functions for adding elements at the end. Vector is the default container. See also: map, multimap, list, deque. TC++PL 3.7.1, 16.3. (BSCppG 2012)
  • C plus plus virtual constructor - a constructor cannot be virtual, because to create an object, we need complete information of its type. “virtual constructor” is the name of a technique for calling a virtual function to create an object of an appropriate type. Example. TC++PL 12.4.4, 15.6.2. (BSCppG 2012)
  • C plus plus virtual destructor - a destructor declared virtual to ensure that the proper derived class destructor is called if an object of a derived class is deleted through a pointer to a base class. If a class has any virtual functions, it should have a virtual destructor. Example. TC++PL 12.4.2, D&E 10.5. (BSCppG 2012)
  • C plus plus virtual member function - a member function that a derived class can override; the primary mechanism for run-time polymorphism in C++. A virtual member function is sometimes called a method. See also: overriding, pure virtual function. TC++PL 2.5.4, 2.5.5, 12.2.6, D&E 3.5, 12.4. (BSCppG 2012)
  • C plus plus virtual-function table - table of all virtual functions for a class. The most common way of implementing virtual functions is to have each object of a class with virtual functions contain a virtual function pointer pointing to the class' virtual function table. (BSCppG 2012)
  • C plus plus void* - pointer to void; that is, a pointer to an object of unknown type; also called pointer to raw memory. A void* cannot be used or assigned without a cast. TC++PL 5.6, D&E 11.2.1, 11.2.3. (BSCppG 2012)
  • C plus plus volatile - attribute of a declaration telling the compiler that an entity can have its value changed by extralinguistic means; for example, a real time clock: “extern volatile const long clock;”. Limits optimizations. TC++PL A.7.1. (BSCppG 2012)

W

  • C plus plus wchar_t - wide character type. Used to hold characters of character sets that require more than a byte to represent, such as unicode. TC++PL 4.3, C.3.3. See also: large character sets, universal character name. (BSCppG 2012)
  • C plus plus whitespace - characters that a represented only by the space they take up on a page or screen. The most common examples are space (' '), newline ('\n'), and tab ('\t'). (BSCppG 2012)
  • C plus plus word - a number of bytes that on a given machine is particularly suied to holding an integers or a pointer. On many machines, an object must be aligned on a word boundary for acceptable performance. An int is typically a stored in a word. Often, a word is 4 bytes. See also: alignment. TC++PL 4.6. (BSCppG 2012)

X

Z

Fair Use Sources


© 1994 - 2024 Cloud Monk Losang Jinpa or Fair Use. Disclaimers

SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.


bjarne_stroustrup_s_c_plus_plus_glossary.txt · Last modified: 2024/05/01 04:23 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki