Common Terms in C ++

Source: Internet
Author: User
Memory alignment
Constant folding
Stack Unwinding)
Template Specialization
Special Template
Template instantiation
Function object
One-definition rule (ODR)
Auto-Reference

Object slicing: When a derived class object is assigned to a base class object, the object is cut. (In addition, the base class object can be forcibly converted to a derived class object). The implementation of polymorphism is through pointers and references. The conversion of objects can only cause object cutting, but cannot realize polymorphism.

Owership Semantics)
Distructive copy Semantics)
Diamond inheritance
Downward force: conversion from base class to derived class
Upward Force: conversion from a derived class to a base class
Cross-force: the force from a base class to its sibling class (involved in multiple inheritance)
Rtti: runtime type information, dynamic_cast, type_info
Predicate: return the bool function object (or function), which has a single-element predicate and binary predicate. The standard library has a predicate.
Activity record)
Stack frame/call stack
Using declaration and using command
In-memory compilation (in-memory compilation)
Peephole Optimizer)
Fragile base-class problem)
Handle class)
Reentrant function
Bit copy and value copy: Bit copy is the address, while value copy is the content.
Shallow copy and deep copy
Return Value Optimization)
Reference counting)
Copy-on-write)
Fan-out)
Redefining: The subclass redefines non-virtual functions with the same name in the parent class (the parameter list can be different ).
Overriding: The polymorphism between the parent class and the Child class. Subclass redefines virtual functions with the same name and parameters in the parent class.
Overload)
Multiple Dispatching)
Exception neutral (exception neutral)
Template metaprogramming
Stable and unstable sorting
Lazy Initialization)
Multi-value assignment
Function call stack)
Inverter and covariant return type
Inheritance tree
Resource Retrieval initializes raiI (resource acquisition is initialization)

Link name search ADL

Memory leakage (Memory Leak)

Wildpointer)

Liskov replacement principle:
Definition 1: If O1 is an object of Type T1, there is an object of Type T2 O2, so that when all program P defined by T1 is replaced by O2 for all object O1, the behavior of program P does not change, so Type T2 is the child type of Type T1.
Definition 2: all objects that reference the base class must be transparently used.
In general, the Rits replacement principle is that child classes can expand the features of the parent class, but cannot change the original features of the parent class. It contains the following four meanings:
Sub-classes can implement abstract methods of parent classes, but cannot overwrite non-Abstract methods of parent classes.
Sub-classes can add their own unique methods.
When the method of the subclass reloads the method of the parent class, the pre-condition (that is, the parameter of the method) of the method is looser than the input parameter of the parent class method.
When the subclass method implements the abstract method of the parent class, the post-condition (that is, the return value of the method) of the method is stricter than that of the parent class.

Short-circuit Evaluation)
Return Value optimization RVO)
Koenig search: Name Search Rule

 

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.