C++ language
Curated hub for core C++ language rules: declarations, types, expressions, classes, templates, object model, initialization, and execution semantics.
The C++ language area is where syntax turns into semantics: declarations introduce entities, expressions produce values and side effects, classes define object structure, templates generalize code, and the object model governs lifetime, storage, and initialization. This hub is the practical entry point into those core rules.
# Start Here
Declarations and names
Start here when the question is about introducing entities, definitions, lookup, linkage, or what a declaration actually means.
Types and object model
Use this route for type categories, cv/ref rules, objects, lifetime, storage duration, and value categories.
Types · Objects · Lifetime · Value categories
Expressions and operators
Choose this route for operator semantics, overload resolution, conversions, evaluation order, and expression forms.
Expressions · Operators · Implicit conversion · Evaluation order
Classes and special members
Start here for class structure, inheritance, access control, constructors, assignment, destruction, and object-oriented language rules.
Templates and generic code
Use this route for template parameters, deduction, specialization, SFINAE, constraints, and generic programming mechanics.
Initialization and execution model
Use this route for initialization forms, constant initialization, exceptions, threading model, and translation/runtime rules.
Initialization · Constant initialization · Exceptions · Memory model
# Quick Map
| If your question is about | Start with | Typical follow-ups |
|---|---|---|
| What a declaration introduces or when two declarations conflict | Declarations | Definitions, Conflicting declarations, Names |
| How an expression is formed, converted, or evaluated | Expressions | Implicit conversion, Operators, Evaluation order |
| How types, references, cv-qualification, or value categories behave | Types | References, cv qualification, Value categories |
| How classes, constructors, inheritance, or virtual dispatch work | Classes | class, Inheritance, Destructor, override |
| How templates are instantiated, constrained, or specialized | Templates | Template parameters, Specialization, SFINAE, requires |
| How an object is initialized or when its lifetime begins | Initialization | Copy initialization, List initialization, Lifetime |
| How the program executes, throws, or interacts across translation boundaries | Exceptions, Translation phases, Multi-threaded executions | noexcept, main, Modules |
# Core Language Areas
| Area | Key pages | Use it for |
|---|---|---|
| Declarations, names, and lookup | Declarations, Definitions, Lookup, Namespace | Understanding how entities are introduced, found, and distinguished across scopes. |
| Type system and object model | Types, type-id, Object, Storage duration, Lifetime | Type categories, object identity, lifetime, storage, and representation-level rules. |
| Expressions, operators, conversions | Expressions, Operators, Implicit conversion, Usual arithmetic conversions | How computations are formed and how operands convert and combine. |
| Classes and member model | Classes, Access, Member functions, virtual, friend | Class structure, inheritance, dispatch, access control, and special member behavior. |
| Templates and generic programming | Templates, Template parameters, Deduction, Constraints, SFINAE | Generic code formation, deduction, specialization, and modern constrained templates. |
| Initialization and value propagation | Initialization, Copy elision, Reference initialization, Move construction | How objects are initialized, copied, moved, elided, and bound to references. |
| Execution and translation model | Exceptions, Memory model, Multi-threaded executions, Translation phases, Modules | Program execution rules, concurrency semantics, compile pipeline, and module boundaries. |
# Practical Routes
I need a type rule
Start here when the issue is references, cv-qualification, type identity, object lifetime, or value categories.
I need an expression or operator rule
Start here when the answer depends on conversions, precedence, overload resolution, or evaluation order.
I need a class or template rule
Start here for constructors, inheritance, templates, specialization, and constraints.
I need initialization or lifetime behavior
Start here when the problem is initialization form, copy elision, storage duration, lifetime extension, or object materialization.
# Boundary Lines
| If you actually need... | Go here |
|---|---|
| Library vocabulary types, type traits, or utility helpers rather than language rules | Utility, <type_traits> |
| Library concurrency primitives instead of the core memory/execution model | Thread support, Atomic operations |
| Preprocessor directives, macros, or translation-unit text processing | Preprocessor |
| C language semantics instead of C++ language semantics | C language |