The Microsoft C++ compiler (MSVC) implements the C++ programming language as defined by the ISO/IEC C++ International Standard, along with a set of Microsoft-specific extensions for Windows platform development. This reference documents the language as implemented in Visual Studio, drawing on the organization established by The Annotated C++ Reference Manual by Margaret Ellis and Bjarne Stroustrup. Whether you are coming to C++ for the first time or returning after years with other languages, this reference covers every major feature area — from fundamental types and expressions all the way through templates, exceptions, and the modern C++ idioms introduced since C++11.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/MicrosoftDocs/cpp-docs/llms.txt
Use this file to discover all available pages before exploring further.
You can target a specific C++ standard version using the
/std compiler option in Visual Studio. MSVC supports /std:c++14, /std:c++17, /std:c++20, and /std:c++latest (for C++23 preview features).What MSVC Supports
MSVC provides broad conformance to the ISO C++ standard across all modern revisions:| Standard | Key Features Added |
|---|---|
| C++11 | auto, nullptr, lambdas, move semantics, constexpr, range-based for, smart pointers, static_assert |
| C++14 | Generic lambdas, variable templates, relaxed constexpr, std::make_unique |
| C++17 | Structured bindings, if constexpr, std::optional, std::variant, std::string_view, parallel algorithms |
| C++20 | Concepts, ranges, coroutines, modules, std::span, three-way comparison (<=>) |
| C++23 | std::expected, std::flat_map, import std;, std::print |
Language Areas Covered
Basic Concepts
Scope, linkage, translation units, the One Definition Rule, lvalues and rvalues, alignment, and trivial/POD types — the foundational rules that govern every C++ program.
Types and Declarations
Fundamental built-in types,
const and volatile qualifiers, typedef and using aliases, auto type deduction, decltype, and type conversion rules.Classes and Structs
Class and struct definitions, member functions, constructors, destructors, inheritance, virtual functions, access control, friend declarations, and the Rule of Five.
Templates
Function and class templates, type parameters, non-type parameters, full and partial specialization, variadic templates, and C++20 concepts.
Exception Handling
C++
try/catch/throw, the standard exception hierarchy, noexcept, exception specifications, and Windows Structured Exception Handling (SEH).Modern C++
Smart pointers, move semantics, perfect forwarding, lambdas, range-based
for, constexpr, std::optional, std::variant, std::span, and C++20 concepts.Additional Language Features
Beyond the core topics in this section, the MSVC C++ Language Reference also covers:- Lexical Conventions — tokens, comments, keywords, punctuators, literals, and file translation phases
- Operators — all built-in operators with their precedence and associativity rules
- Expressions — expression types, value categories, casting operators, and runtime type information (RTTI)
- Statements — selection, iteration, jump, and declaration statements
- Unions — user-defined types where all members share the same memory location
- Overloading — function and operator overloading rules
- Microsoft-Specific Modifiers —
__declspec, calling conventions,__asm, and other MSVC extensions - Compiler COM Support — Microsoft-specific classes and functions for COM interop