Skip to content

Commit a1e91a7

Browse files
authored
Merge pull request #5757 from MicrosoftDocs/main
01/30/2025 AM Publishing
2 parents c699537 + 586dfb7 commit a1e91a7

5 files changed

+52
-38
lines changed

docs/build/arm64-windows-abi-conventions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Like AArch32, the AArch64 specification provides three system-controlled "thread
118118

119119
## Floating-point exceptions
120120

121-
Support for IEEE floating-point exceptions is optional on AArch64 systems. For processor variants that do have hardware floating-point exceptions, the Windows kernel silently catches the exceptions and implicitly disables them in the FPCR register. This trap ensures normalized behavior across processor variants. Otherwise, code developed on a platform without exception support may find itself taking unexpected exceptions when running on a platform with support.
121+
Support for IEEE floating-point exceptions on AArch64 systems is optional. This can be verified by writing a value that enables exceptions to the `FPCR` register and then reading it back. The bits corresponding to supported exceptions will remain set, while the bits corresponding to unsupported exceptions will be reset by the CPU.
122122

123123
## Parameter passing
124124

docs/build/reference/std-specify-language-standard-version.md

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: "/std (Specify Language Standard Version)"
33
description: "The MSVC compiler option /std specifies the C or C++ language standard supported by the compiler."
4-
ms.date: 4/9/2023
5-
f1_keywords: ["/std", "-std", "/std:c++14", "/std:c++17", "/std:c++20", "/std:c11", "/std:c17", "/std:clatest", "VC.Project.VCCLCompilerTool.CppLanguageStandard"]
4+
ms.date: 1/29/2025
5+
f1_keywords: ["/std", "-std", "/std:c++14", "/std:c++17", "/std:c++20", "/std:c++23preview", "/std:c++latest", "/std:c11", "/std:c17", "/std:clatest", "VC.Project.VCCLCompilerTool.CppLanguageStandard"]
66
---
77
# `/std` (Specify Language Standard Version)
88

@@ -13,6 +13,7 @@ Enable supported C and C++ language features from the specified version of the C
1313
> **`/std:c++14`**\
1414
> **`/std:c++17`**\
1515
> **`/std:c++20`**\
16+
> **`/std:c++23preview`**\
1617
> **`/std:c++latest`**\
1718
> **`/std:c11`**\
1819
> **`/std:c17`**\
@@ -24,63 +25,73 @@ The **`/std`** options are available in Visual Studio 2017 and later. They're us
2425

2526
The Microsoft C++ compiler in Visual Studio 2017 and later versions doesn't support C++ standards modes earlier than C++14 (**`/std:c++14`**). Such support isn't planned. As an imperfect workaround, it's possible to use older Visual C++ compiler toolsets that didn't implement features from later standards. For more information on how to install and use older compiler toolsets in Visual Studio, see [Use native multi-targeting in Visual Studio to build old projects](../../porting/use-native-multi-targeting.md).
2627

27-
### C++ standards support
28+
## C++ standards support
2829

29-
The **`/std`** option in effect during a C++ compilation can be detected by use of the [`_MSVC_LANG`](../../preprocessor/predefined-macros.md) preprocessor macro. For more information, see [Preprocessor Macros](../../preprocessor/predefined-macros.md).
30+
Detect whether the **`/std`** option is in effect during a C++ compilation with the [`_MSVC_LANG`](../../preprocessor/predefined-macros.md) preprocessor macro. For more information, see [Preprocessor Macros](../../preprocessor/predefined-macros.md).
3031

3132
> [!IMPORTANT]
3233
> Because some existing code depends on the value of the macro `__cplusplus` being `199711L`, the MSVC compiler doesn't change the value of this macro unless you explicitly opt in by setting [`/Zc:__cplusplus`](zc-cplusplus.md). Specify `/Zc:__cplusplus` and the **`/std`** option to set `__cplusplus` to the appropriate value.
3334
34-
**`/std:c++14`**\
35-
The **`/std:c++14`** option enables C++14 standard-specific features implemented by the MSVC compiler. This option is the default for code compiled as C++. It's available starting in Visual Studio 2015 Update 3.
35+
### `/std:c++14`
36+
37+
Enables C++14 standard-specific features implemented by the MSVC compiler. This option is the default for code compiled as C++. It's available starting in Visual Studio 2015 Update 3.
3638

3739
This option disables compiler and standard library support for features that are changed or new in more recent versions of the language standard. However, it doesn't disable some C++17 features already implemented in previous releases of the MSVC compiler. For more information, see [Microsoft C/C++ language conformance](../../overview/visual-cpp-language-conformance.md). The tables indicate which C++17 features are enabled when you specify **`/std:c++14`**.
3840

39-
The following features remain enabled when the **`/std:c++14`** option is specified to avoid breaking changes for users who have already taken dependencies on the features available in or before Visual Studio 2015 Update 2:
41+
The following features remain enabled when the **`/std:c++14`** option is specified to avoid breaking changes for users who took dependencies on features available in or before Visual Studio 2015 Update 2:
4042

4143
- [Rules for `auto` with braced-init-lists](https://wg21.link/n3922)
4244
- [`typename` in template template-parameters](https://wg21.link/n4051)
4345
- [Removing trigraphs](https://wg21.link/n4086)
4446
- [Attributes for namespaces and enumerators](https://wg21.link/n4266)
4547
- [u8 character literals](https://wg21.link/n4267)
4648

47-
**`/std:c++17`**\
48-
The **`/std:c++17`** option enables C++17 standard-specific features and behavior. It enables the full set of C++17 features implemented by the MSVC compiler. This option disables compiler and standard library support for features that are new or changed after C++17. It specifically disables post-C++17 changes in the C++ Standard and versions of the Working Draft. It doesn't disable retroactive defect updates of the C++ Standard. This option is available starting in Visual Studio 2017 version 15.3.
49+
### `/std:c++17`
50+
51+
Enables C++17 standard-specific features and behavior. It enables the full set of C++17 features implemented by the MSVC compiler. This option disables compiler and standard library support for features that are new or changed after C++17. It specifically disables post-C++17 changes in the C++ Standard and versions of the Working Draft. It doesn't disable retroactive defect updates of the C++ Standard. This option is available starting in Visual Studio 2017 version 15.3.
4952

5053
Depending on the MSVC compiler version or update level, C++17 features may not be fully implemented or fully conforming when you specify the **`/std:c++17`** option. For an overview of C++ language conformance in Visual C++ by release version, see [Microsoft C/C++ language conformance](../../overview/visual-cpp-language-conformance.md).
5154

52-
**`/std:c++20`**\
53-
The **`/std:c++20`** option enables C++20 standard-specific features and behavior. Available starting in Visual Studio 2019 version 16.11, it enables the full set of C++20 features implemented by the MSVC compiler. Note that Visual Studio 2022 version 17.0 does not support `std::format`, the C++20 `<chrono>` formatting extensions, and the range factories and range adaptors from `<ranges>` under **`/std:c++20`** due to late-breaking changes in those features immediately after publication of the Standard.
55+
### `/std:c++20`
56+
57+
Enables C++20 standard-specific features and behavior.
58+
59+
Enables the standard conformance mode provided by [**`/permissive-`**](./permissive-standards-conformance.md) unless explicitly overridden with **`/permissive`**.
5460

55-
The **`/std:c++20`** option disables compiler and standard library support for features that are new or changed after C++20. It specifically disables post-C++20 changes in the C++ Standard and versions of the Working Draft. It doesn't disable retroactive defect updates of the C++ Standard.
61+
### `/std:c++23preview`
5662

57-
The **`/std:c++20`** option enables the standard conformance mode provided by [**`/permissive-`**](./permissive-standards-conformance.md) unless explicitly overriden with **`/permissive`**.
63+
Enables preview C++23 standard-specific features and behavior. Available starting in Visual Studio 2022 version 17.13 Preview 4. Preview features may change and may not be ABI compatible across releases.
5864

59-
**`/std:c++latest`**\
60-
The **`/std:c++latest`** option enables all currently implemented compiler and standard library features proposed for the next draft standard, as well as some in-progress and experimental features. This option is available starting in Visual Studio 2015 Update 3.
65+
This switch will be removed when the `/std:c++23` switch is implemented--at which point C++23 features will be fully implemented and ABI stable. If in project properties **C/C++** > **Language** you specify **Preview - ISO C++ 23 Standard (/std:c++preview)**, it will automatically change to mean `/std:c++23` once the new switch is implemented.
6166

62-
Depending on the MSVC compiler version or update level, C++17, C++20, or proposed C++23 features may not be fully implemented or fully conforming when you specify the **`/std:c++latest`** option. We recommend you use the latest version of Visual Studio for maximum standards conformance. For an overview of C++ language and library conformance in Visual C++ by release version, see [Microsoft C/C++ language conformance](../../overview/visual-cpp-language-conformance.md).
67+
This switch differs from `/std:c++latest` in that it only enables features that are part of the C++23 standard. It doesn't enable experimental or in-progress features.
6368

64-
In versions of Visual Studio 2019 before version 16.11, **`/std:c++latest`** is required to enable all the compiler and standard library features of C++20.
69+
### `/std:c++latest`
6570

66-
Since Visual Studio 2019 version 16.8, the **`/std:c++latest`** option has enabled the standard conformance mode provided by [**`/permissive-`**](./permissive-standards-conformance.md) unless explicitly overriden with **`/permissive`**.
71+
Enables all currently implemented compiler and standard library features proposed in the next ISO C++ working draft, as well as some in-progress and experimental features. This option is available starting with Visual Studio 2015 Update 3.
72+
73+
Depending on the MSVC compiler version or update level, features from published C++ standards or proposed features in the current C++ working draft, may not be fully implemented or fully conforming when you specify the **`/std:c++latest`** option. We recommend you use the latest version of Visual Studio for maximum standards conformance. For an overview of C++ language and library conformance in Visual C++ by release version, see [Microsoft C/C++ language conformance](../../overview/visual-cpp-language-conformance.md).
74+
75+
Since Visual Studio 2019 version 16.8, the **`/std:c++latest`** option has enabled the standard conformance mode provided by [**`/permissive-`**](./permissive-standards-conformance.md) unless explicitly overridden with **`/permissive`**.
6776

6877
For a list of supported language and library features, see [What's New for C++ in Visual Studio](../../overview/what-s-new-for-visual-cpp-in-visual-studio.md).
6978

7079
The **`/std:c++latest`** option doesn't enable features guarded by the **`/experimental`** switch, but may be required to enable them.
7180

7281
> [!NOTE]
73-
> The compiler and library features enabled by **`/std:c++latest`** may appear in a future C++ standard. Features that have not been approved are subject to breaking changes or removal without notice and are provided on an as-is basis.
82+
> The compiler and library features enabled by **`/std:c++latest`** may appear in a future C++ standard. Features that haven't been approved are subject to breaking changes or removal without notice and are provided on an as-is basis.
7483
75-
### C standards support
84+
## C standards support
7685

7786
You can invoke the Microsoft C compiler by using the [`/TC` or `/Tc`](tc-tp-tc-tp-specify-source-file-type.md) compiler option. It's used by default for code that has a *`.c`* file extension, unless overridden by a **`/TP`** or **`/Tp`** option. The default C compiler (that is, the compiler when **`/std:c11`** or **`/std:c17`** isn't specified) implements ANSI C89, but includes several Microsoft extensions, some of which are part of ISO C99. Some Microsoft extensions to C89 can be disabled by using the [`/Za`](za-ze-disable-language-extensions.md) compiler option, but others remain in effect. It isn't possible to specify strict C89 conformance. The compiler doesn't implement several required features of C99, so it isn't possible to specify C99 conformance, either.
7887

79-
**`/std:c11`**\
80-
The **`/std:c11`** option enables ISO C11 conformance. It's available starting in Visual Studio 2019 version 16.8.
88+
### `/std:c11`
89+
90+
Enables ISO C11 conformance. It's available starting in Visual Studio 2019 version 16.8.
91+
92+
### `/std:c17`
8193

82-
**`/std:c17`**\
83-
The **`/std:c17`** option enables ISO C17 conformance. It's available starting in Visual Studio 2019 version 16.8.
94+
Enables ISO C17 conformance. It's available starting in Visual Studio 2019 version 16.8.
8495

8596
Because the new preprocessor is needed to support these standards, the **`/std:c11`** and **`/std:c17`** compiler options set the [`/Zc:preprocessor`](zc-preprocessor.md) option automatically. If you want to use the traditional (legacy) preprocessor for C11 or C17, you must set the **`/Zc:preprocessor-`** compiler option explicitly. Setting the **`/Zc:preprocessor-`** option may lead to unexpected behavior, and isn't recommended.
8697

@@ -90,15 +101,10 @@ Because the new preprocessor is needed to support these standards, the **`/std:c
90101
When you specify **`/std:c11`** or **`/std:c17`**, MSVC supports all the features of C11 and C17 required by the standards. The **`/std:c11`** and **`/std:c17`** compiler options enable support for these functionalities:
91102

92103
- [`_Pragma`](../../preprocessor/pragma-directives-and-the-pragma-keyword.md#the-pragma-preprocessing-operator)
93-
94104
- [`restrict`](../../c-language/type-qualifiers.md#restrict)
95-
96105
- [`_Noreturn`](../../c-language/noreturn.md) and \<stdnoreturn.h>
97-
98106
- [`_Alignas`, `_Alignof`](../../c-language/alignment-c.md) and \<stdalign.h>
99-
100107
- [`_Generic`](../../c-language/generic-selection.md) and \<tgmath.h>
101-
102108
- [`_Static_assert`](../../c-language/static-assert-c.md)
103109

104110
The IDE uses C settings for IntelliSense and code highlighting when your source files have a *`.c`* file extension, or when you specify the [`/TC` or `/Tc`](tc-tp-tc-tp-specify-source-file-type.md) compiler option. Currently, IntelliSense in C highlights keywords `_Alignas`, `_Alignof`, `_Noreturn`, and `_Static_assert`, but not the equivalent macros defined in the standard headers: `alignas`, `alignof`, `noreturn`, and `static_assert`.
@@ -115,17 +121,16 @@ The compiler doesn't support most optional features of ISO C11. Several of these
115121

116122
- Variable length array (VLA) support isn't planned. VLAs provide attack vectors comparable to [`gets`](../../c-runtime-library/gets-getws.md), which is deprecated and planned for removal.
117123

118-
**`/std:clatest`**\
119-
The **`/std:clatest`** option behaves like the `/std:c++latest` switch for the C++ compiler. The switch enables all currently implemented compiler and standard library features proposed for the next draft C standard, as well as some in-progress and experimental features.
124+
### `/std:clatest`
125+
126+
The **`/std:clatest`** option behaves like the `/std:c++latest` switch for the C++ compiler. The switch enables all currently implemented compiler and standard library features proposed in the next draft C standard, as well as some in-progress and experimental features.
120127

121128
For more information, see the C Standard library features section of [Microsoft C/C++ language conformance](../../overview/visual-cpp-language-conformance.md).
122129

123130
### To set this compiler option in the Visual Studio development environment
124131

125132
1. Open the project's **Property Pages** dialog box. For more information, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
126-
127133
1. Select the **Configuration Properties** > **C/C++** > **Language** property page.
128-
129134
1. In **C++ Language Standard** (or for C, **C Language Standard**), choose the language standard to support from the dropdown control, then choose **OK** or **Apply** to save your changes.
130135

131136
## See also

docs/porting/binary-compat-2015-2017.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,6 @@ This error is by design. We recommend you keep the newest version installed. Mak
3939
## See also
4040

4141
[Visual C++ change history](../porting/visual-cpp-change-history-2003-2015.md)\
42-
[The latest supported Visual C++ Redistributable downloads](../windows/latest-supported-vc-redist.md)
42+
[The latest supported Visual C++ Redistributable downloads](../windows/latest-supported-vc-redist.md)\
43+
[How to audit Visual C++ Runtime version usage](../windows/redist-version-auditing.md)\
44+
[Lifecycle FAQ - Visual C++ Redistributable and runtime libraries](/lifecycle/faq/visual-c-faq)

docs/windows/latest-supported-vc-redist.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,13 @@ Download Redistributable files for other languages and architectures from:
115115
116116
- Redistributable files for X86, X64, and IA64 architectures are available from [Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update](https://www.microsoft.com/download/details.aspx?id=26347).
117117

118-
## Release notes
118+
## See Also
119+
120+
- [C++ binary compatibility between Visual Studio versions](../porting/binary-compat-2015-2017.md)
121+
- [How to audit Visual C++ Runtime version usage](redist-version-auditing.md)
122+
- [Lifecycle FAQ - Visual C++ Redistributable and runtime libraries](/lifecycle/faq/visual-c-faq)
123+
124+
**Release notes**
119125

120126
- [Visual Studio 2022 release notes](/visualstudio/releases/2022/release-notes)
121127
- [What's new for C++ in Visual Studio](../overview//what-s-new-for-visual-cpp-in-visual-studio.md)
@@ -125,7 +131,7 @@ Download Redistributable files for other languages and architectures from:
125131
- [A year of C++ improvements](https://devblogs.microsoft.com/cppblog/a-year-of-cpp-improvements-in-visual-studio-vs-code-and-vcpkg)
126132
- [Microsoft Visual C++ compiler versioning](../overview/compiler-versions.md)
127133

128-
## C++ conformance notes
134+
**C++ conformance notes**
129135

130136
- [C++ conformance improvements in Visual Studio](../overview/cpp-conformance-improvements.md)
131137
- [C++ conformance improvements in Visual Studio 2019](../overview/cpp-conformance-improvements-2019.md)

docs/windows/redist-version-auditing.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,4 +192,5 @@ Here is where each version of the VC Runtime is installed:
192192

193193
[Redistributing Visual C++ Files](redistributing-visual-cpp-files.md)\
194194
[The latest supported Visual C++ downloads](latest-supported-vc-redist.md)\
195-
[Lifecycle FAQ - Visual C++ Redistributable and runtime libraries](/lifecycle/faq/visual-c-faq)
195+
[Lifecycle FAQ - Visual C++ Redistributable and runtime libraries](/lifecycle/faq/visual-c-faq)\
196+
[C++ binary compatibility between Visual Studio versions](../porting/binary-compat-2015-2017.md)

0 commit comments

Comments
 (0)