A-Z

   
Algorithm

A generic function, usually one that operates on a sequence specified by a pair of iterators. See Chapter 10.



Argument

An expression that is used in a function call to initialize a function parameter (Chapter 3). Can also be a template argument (Chapter 7).



cv -qualifier

A const or volatile qualifier, or both (in any order). See Chapter 2.



Deprecated

Obsolete. A language or library feature that is deprecated might be removed from the next version of the standard. You should avoid using deprecated features if you can.



Explicit specialization

The C++ standard term for a template definition that defines a special case of an earlier template, supplying one or more template arguments that apply only to the explicit specialization. In this book, plain specialization means the same thing. See Chapter 7.



Ill- formed

A source file or program that does not follow the rules of the C++ standard. This book uses informal terms, such as "illegal" or "invalid," to refer to programs that are ill-formed or that invoke undefined behavior. See also Well-formed .



Implementation-defined behavior

Behavior that is well-defined but varies from one implementation to another. The vendor is required to document the precise behavior. For example, the size of an int is implementation-defined. It might be 16 bits, 32 bits, 48 bits, or some other size. The C++ standard can mandate limits on the implementation-defined behavior ”for example, the minimum size for an int is 16 bits.



Instance or instantiation

Can be a template instance or class instance. A template instance applies a set of template arguments to a template name , creating a specific function or class. Each template argument is matched with a template parameter; arguments can be explicit, or can be deduced for a function template or supplied by default arguments for a class template. See Chapter 7.

A class instance is an object of class type. See Object , Chapter 6.



Iterator

An abstraction of a pointer that can point to an element of a container or other sequence. Most algorithms work with iterators. See Chapter 10.



Lvalue

An object reference. You can take the address of an lvalue, but you cannot take the address of an rvalue. The lefthand operand of the built-in assignment operator must be a non- const lvalue (hence the l in lvalue). See also Rvalue , Chapter 3.



NRVO

Named Return Value Optimization. A compiler is free to optimize away the call to a copy constructor when an object is returned from a function. Some compilers perform this optimization only when the return expression is the name of an object. See also RVO .



Object

A region of storage with a type. Unlike some object-oriented languages, the term "object" is not restricted to instances of class type. An object of class type can be an lvalue or an rvalue. An object of fundamental or enumerated type is an lvalue. See Chapter 2.



ODR

One Definition Rule. A program can have any number of declarations of an entity, such as a function, template, or global variable. It must have at most one definition of these entities. See Chapter 2 for details and exceptions to this rule.



Opaque type

A type whose implementation is hidden. A pimpl is one way to implement an opaque type. See also Pimpl idiom .



Parameter

Function parameter or template parameter. A function parameter is an object that is local to the function and is initialized with the value of a function argument in a function call. See Chapter 5.

A template parameter can be a value, a type, or a template; it gets its "value" from a template argument in a template instantiation. See Chapter 7.



Parametric polymorphism

Generic programming, such that a function can have a single definition that applies regardless of the type of its parameters. See Chapter 7.



Pimpl idiom

A way of implementing an opaque type that uses a wrapper class that holds a pointer to a hidden implementation class. The name can mean pointer-to-implementation. See Opaque type , Chapter 6.



POD

Plain Old Data. A C-style type: a fundamental type, enumerated type, a pointer to a POD type, or an array of POD types. A class, structure, or union can be a POD type if its nonstatic data members all have POD types. See Chapter 6.



Polymorphism

Greek for "having many shapes ." Usually means type polymorphism . See also Parametric polymorphism .



RAII

Resource Allocation Is Initialization applies to a style of programming that ensures that resources are correctly allocated and deallocated. The auto_ptr<> template is an example of RAII.



Rvalue

A value that does not necessarily have any storage or address. An rvalue of fundamental type can appear only on the right side of an assignment (hence the R in Rvalue). An lvalue can be implicitly converted to an rvalue, but not the other way around. See Chapter 3.



RVO

Return Value Optimization. A compiler is free to optimize away the call to a copy constructor when an object is returned from a function. See also NRVO .



SFINAE

Substitution Failure Is Not An Error. When the compiler looks for candidate functions for overload resolution, all function templates with the desired name are initially considered. If the compiler cannot generate a template instance to match the function call's arguments, that function template is not considered . That is, failure to substitute the arguments is not an error.



Specialization

Defining a template for a specific set of template arguments. A specialization can be total (specifying all template arguments) or partial (specifying only some of the template arguments). Only class templates can have partial specializations. See Chapter 7.



Type polymorphism

An object can have a pointer or reference to a base class as its type. At runtime, it can take a pointer or reference to a derived class as its value. At runtime, calls to virtual functions bind to the functions in the derived class. The derived-class type is known as the object's dynamic type ; the declared type of the object is the static type . See Chapter 6.



Undefined behavior

Anything can happen. Maybe an exception will be thrown; maybe a signal will be raised; maybe the application will crash and burn. A particular implementation might have well-defined behavior, but different implementations are free to choose different behaviors. For example, dereferencing a null pointer produces undefined behavior. A desktop application might raise a segmentation fault signal. An embedded control for a toy robot might reset itself. An operating system kernel might panic and shut down, possibly corrupting filesystems and databases. Anything can happen.



Well-formed

A program that obeys the syntactic rules, the diagnosable semantic rules, and the one-definition rule of the C++ standard. Note that the compiler is not required to diagnose all errors, so you can have a program that is well-formed but still incorrect. See also Ill-formed .



   


C++ in a Nutshell
C++ in a Nutshell
ISBN: 059600298X
EAN: 2147483647
Year: 2005
Pages: 270
Authors: Ray Lischner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net