Skip to content

Repo sync for protected branch #5016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions docs/build/reference/std-specify-language-standard-version.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "/std (Specify Language Standard Version)"
description: "The MSVC compiler option /std specifies the C or C++ language standard supported by the compiler."
ms.date: 4/5/2023
ms.date: 4/9/2023
f1_keywords: ["/std", "-std", "/std:c++14", "/std:c++17", "/std:c++20", "/std:c11", "/std:c17", "/std:clatest", "VC.Project.VCCLCompilerTool.CppLanguageStandard"]
---
# `/std` (Specify Language Standard Version)
Expand Down Expand Up @@ -29,13 +29,7 @@ The Microsoft C++ compiler in Visual Studio 2017 and later versions doesn't supp
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).

> [!IMPORTANT]
> 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). Here are the values for `__cplusplus` depending on the language version you are compiling with:
>
> | Language version | __cplusplus value |
> |------------------|-------------------|
> | `/std:c++14` | 201402 |
> | `/std:c++17` | 201703 |
> | `/std:c++20` | 202002 |
> 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.

**`/std:c++14`**\
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.
Expand Down