Skip to content

Commit 0b7e40a

Browse files
TylerMSFTTylerMSFT
andauthored
* add what's new in C++ * tool generated. commit so I can see a better diff * draft * acrolinx * edits * update links * links * cleanup * add std:clatest * add link * add clatest * fixes * fix link --------- Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com>
1 parent 89138b7 commit 0b7e40a

6 files changed

+191
-193
lines changed

docs/build/reference/compiler-options-listed-alphabetically.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Compiler options listed alphabetically"
33
description: "Reference listing in alphabetical order of the Microsoft C/C++ compiler command-line options."
4-
ms.date: 06/02/2023
4+
ms.date: 11/13/2023
55
helpviewer_keywords: ["compiler options, C++"]
66
---
77
# Compiler options listed alphabetically
@@ -177,6 +177,7 @@ This table contains an alphabetical list of compiler options. For a list of comp
177177
| [`/std:c++latest`](std-specify-language-standard-version.md) | The latest draft C++ standard preview features. |
178178
| [`/std:c11`](std-specify-language-standard-version.md) | C11 standard ISO/IEC 9899:2011. |
179179
| [`/std:c17`](std-specify-language-standard-version.md) | C17 standard ISO/IEC 9899:2018. |
180+
| [`/std:clatest`](std-specify-language-standard-version.md) | The latest draft C standard preview features. |
180181
| [`/TC`](tc-tp-tc-tp-specify-source-file-type.md) | Specifies all source files are C. |
181182
| [`/Tc`](tc-tp-tc-tp-specify-source-file-type.md) | Specifies a C source file. |
182183
| [`/TP`](tc-tp-tc-tp-specify-source-file-type.md) | Specifies all source files are C++. |

docs/build/reference/compiler-options-listed-by-category.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Compiler Options Listed by Category"
33
description: "Reference listing by category of the Microsoft C/C++ compiler command-line options."
4-
ms.date: 06/02/2023
4+
ms.date: 11/13/2023
55
helpviewer_keywords: ["compiler options, C++"]
66
---
77
# Compiler options listed by category
@@ -165,6 +165,7 @@ This article contains a categorical list of compiler options. For an alphabetica
165165
| [`/std:c++latest`](std-specify-language-standard-version.md) | The latest draft C++ standard preview features. |
166166
| [`/std:c11`](std-specify-language-standard-version.md) | C11 standard ISO/IEC 9899:2011. |
167167
| [`/std:c17`](std-specify-language-standard-version.md) | C17 standard ISO/IEC 9899:2018. |
168+
| [`/std:clatest`](std-specify-language-standard-version.md) | The latest draft C standard preview features. |
168169
| [`/vd{0|1|2}`](vd-disable-construction-displacements.md) | Suppresses or enables hidden `vtordisp` class members. |
169170
| [`/vmb`](vmb-vmg-representation-method.md) | Uses best base for pointers to members. |
170171
| [`/vmg`](vmb-vmg-representation-method.md) | Uses full generality for pointers to members. |

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

Lines changed: 7 additions & 3 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: 07/07/2022
5-
f1_keywords: ["/std", "-std", "/std:c++14", "/std:c++17", "/std:c11", "/std:c17", "VC.Project.VCCLCompilerTool.CppLanguageStandard"]
4+
ms.date: 11/13/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"]
66
---
77
# `/std` (Specify Language Standard Version)
88

@@ -15,7 +15,8 @@ Enable supported C and C++ language features from the specified version of the C
1515
> **`/std:c++20`**\
1616
> **`/std:c++latest`**\
1717
> **`/std:c11`**\
18-
> **`/std:c17`**
18+
> **`/std:c17`**\
19+
> **`/std:clatest`**
1920
2021
## Remarks
2122

@@ -107,6 +108,9 @@ The compiler doesn't support most optional features of ISO C11. Several of these
107108

108109
- 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.
109110

111+
**`/std:clatest`**\
112+
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.
113+
110114
For more information, see the C Standard library features section of [Microsoft C/C++ language conformance](../../overview/visual-cpp-language-conformance.md).
111115

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

docs/overview/cpp-conformance-improvements.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ For a broader summary of changes made to the C++ Standard Library, see [STL Chan
3232

3333
Visual Studio 2022 version 17.7 contains the following highlighted conformance improvements, bug fixes, and behavior changes in the Microsoft C/C++ compiler.
3434

35+
### Added `/std:clatest` to the C compiler
36+
37+
This switch 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.
38+
3539
### C++ Standard Library
3640

3741
The `<print>` library is now supported. See [P2093R14 Formatted output](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2093r14.html).

docs/overview/what-s-new-for-visual-cpp-in-visual-studio.md

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
11
---
22
title: "What's new for C++ in Visual Studio"
33
description: "The new features and fixes in the Microsoft C/C++ compiler and tools in Visual Studio."
4-
ms.date: 08/23/2023
4+
ms.date: 11/09/2023
55
ms.technology: "cpp-ide"
66
ms.custom: intro-whats-new
77
---
88

99
# What's new for C++ in Visual Studio 2022
1010

11-
Visual Studio 2022 brings many updates and fixes to the Microsoft C++ environment. We've added features and fixed many bugs and issues in the compiler and tools. The Visual Studio IDE also offers significant improvements in performance and productivity, and now runs natively as a 64-bit application.
11+
Visual Studio 2022 brings many updates and fixes to the Microsoft C++ environment. We added features and fixed many bugs and issues in the compiler and tools. The Visual Studio IDE also offers significant improvements in performance and productivity, and now runs natively as a 64-bit application.
1212

1313
For more information on what's new in all of Visual Studio, see [What's new in Visual Studio 2022](/visualstudio/ide/whats-new-visual-studio-2022?view=vs-2022&preserve-view=true). For information about what's new in the C++ docs, see [Microsoft C++ docs: What's new](./whats-new-cpp-docs.md)
1414

15+
## What's new for C++ in Visual Studio version 17.8
16+
17+
Briefly, some of the new features are:
18+
* C++ structured diagnostics in the Output window and a new problem details window that provides more information about the error. For more information, see [Structured SARIF Output](../build/reference/sarif-output.md) and [Problem Details Window](/visualstudio/ide/reference/problem-details-window).
19+
* A feature that lets you visualize the size and alignment of your classes, structs, unions, base types, or enums even before the code is compiled. Hover over the identifier and a Quick Info displays the size and alignment information.
20+
* A feature that suggests when to mark member functions `const` because they don’t modify the object’s state. Hover over a member function and click the light bulb icon to mark the function as `const`.
21+
* Visual Studio now prompts you to mark global functions as static via a screwdriver icon that will appear by the function name. Click the screwdriver icon to mark the function as static.
22+
* Unused #include directives are dimmed in the editor. You can hover over a dimmed include and use the light bulb menu to either remove that include or all unused includes. You can also add `#include` directives for entities that are currently indirectly included via other headers. For more information, see [Clean up C/C++ includes in Visual Studio](../ide/include-cleanup-overview.md).
23+
* More Unreal Engine support:
24+
* Unreal Engine Test Adapter lets you discover, run, manage, and debug your Unreal Engine tests without leaving the Visual Studio IDE.
25+
* With Unreal Engine Code Snippets, you can find common Unreal Engine constructs as snippets in your member list.
26+
* Build Insights is now integrated with Visual Studio 2022 and works with MSBuild and CMake projects using MSVC. You can now see additional information about the compilation of a function such as how long it took to compile and the number of ForceInlines.
27+
* Remote Linux unit test support now lets you run your CTest and GTest tests on your remote Linux machines from Visual Studio’s Test Explorer, just like your local tests.
28+
29+
For a summary of new features in the Visual Studio 17.8 IDE, see [Visual Studio 2022 version 17.8 Release Notes](/visualstudio/releases/2022/release-notes).
30+
1531
## What's new for C++ in Visual Studio version 17.7
1632

1733
For a summary of new C++ features in Visual Studio 17.7, see [What’s New for C++ Developers in Visual Studio 2022 17.7](https://devblogs.microsoft.com/cppblog/whats-new-for-c-developers-in-visual-studio-2022-17-7/).
@@ -22,6 +38,7 @@ Briefly, some of the new features are:
2238
* One-click download for Windows Subsystem for Linux (WSL)
2339
* Improved support for Doxygen comments
2440
* C++ Build Insights for game development
41+
* Added [`/std:clatest`](../build/reference/std-specify-language-standard-version.md) for the C compiler.
2542
* Unreal Engine project improvements such as faster IntelliSense and syntax colorization, the ability to find all Unreal Engine Blueprint references, and more.
2643

2744
For a summary of new C++ features that are specific to game development, see [Unleashing the Power of Visual Studio 2022 for C++ Game Development](https://devblogs.microsoft.com/visualstudio/unleashing-the-power-of-visual-studio-2022-for-c-game-development/#:~:text=Unleashing%20the%20Power%20of%20Visual%20Studio%202022%20for,6%20Optimizing%20Build%20Times%20in%20Visual%20Studio%20)
@@ -97,7 +114,7 @@ For a summary of new features and bug fixes in Visual Studio in version 17.4, se
97114

98115
- Improved compiler error messages to provide more correct and useful information, especially for concepts.
99116

100-
- Added experimental MSVC option **`/experimental:log<directory>`** to output SARIF build logs to the specified directory.
117+
- Added experimental MSVC option [`/experimental:log<directory>`](../build/reference/experimental-log.md) to output [structured SARIF diagnostics](../build/reference/sarif-output.md) to the specified directory.
101118

102119
- Added support for C23 attributes to IntelliSense and continued progress in C++20 modules support.
103120

@@ -121,7 +138,7 @@ For a summary of new features and bug fixes in Visual Studio in version 17.4, se
121138
- Updated the version of CMake shipped with Visual Studio to version 3.24.1. For details of what is available, see the [CMake release notes](https://cmake.org/cmake/help/v3.24/release/3.24.html).
122139

123140
- Android SDK update:
124-
- Ant scripts have been removed, so users no longer see Ant-based templates in the New Project dialog. For help migrating from Ant templates to Gradle templates, see [Migrating Builds From Apache Ant](https://docs.gradle.org/current/userguide/migrating_from_ant.html)
141+
- Ant scripts were removed, so users no longer see Ant-based templates in the New Project dialog. For help migrating from Ant templates to Gradle templates, see [Migrating Builds From Apache Ant](https://docs.gradle.org/current/userguide/migrating_from_ant.html)
125142
- Added support for building with NDK 23 and 24
126143
- Updated NDK component to the LTS version 23
127144

@@ -158,7 +175,7 @@ For a summary of new features and bug fixes in Visual Studio in version 17.3, se
158175
- Visual Studio can now add Unreal Engine class templates for your UE projects. To try this feature, ensure **IDE support for Unreal Engine** is selected in the **Game development with C++** workload in the Visual Studio Installer. When you're working on a UE project, right-click in the project or a folder/filter and select **Add** > **UE Class**.
159176

160177
- **Go to Definition** now remembers the prior signature and navigates accordingly when a better match isn't available (for example, after you manually change the signature of one of the pair).
161-
We've improved responsiveness of **Go To All**. Previously, results appeared after you stopped typing. In the new experience, results show as you type.
178+
The responsiveness of **Go To All** is improved. Previously, results appeared after you stopped typing. In the new experience, results show as you type.
162179

163180
- In contexts requiring `enum` type completion (for example, assignments to `enum` variables, case labels, returning `enum` type, and so on), the autocompletion list is now filtered to just the matching enumerators and related constructs.
164181

@@ -174,7 +191,7 @@ We've improved responsiveness of **Go To All**. Previously, results appeared aft
174191

175192
- Updated the side-by-side Dev 16.11 C++ Toolset to version 14.29.30145.00. The latest version of the Dev 16.11 C++ Toolset contains important bug fixes, including fixing all remaining C++20 defect reports. For more information about bug fixes, including C++20 defect reports in Dev 16.11, see [Visual Studio 2019 version 16.11.14 release notes](/visualstudio/releases/2019/release-notes#16.11.14).
176193

177-
- We have made various improvements to the in-editor experience of C++ modules. We're continuously working on improving the quality of the experience but encourage you to try them in 17.3. Report remaining issues through [Developer Community](https://aka.ms/vsfeedback/browsecpp).
194+
- Made various improvements to the in-editor experience of C++ modules. We're continuously working on improving the quality of the experience but encourage you to try them in 17.3. Report remaining issues through [Developer Community](https://aka.ms/vsfeedback/browsecpp).
178195

179196
## What's new for C++ in Visual Studio version 17.2
180197

@@ -190,12 +207,12 @@ For a summary of new features and bug fixes in Visual Studio in version 17.2, se
190207

191208
- In 17.1, we introduced peripheral register and RTOS views for embedded developers. We continue to improve the capabilities of those views with usability improvements in 17.2:
192209
- The RTOS tool window is now hidden by default. It prevents showing a tool window with error messages that aren't relevant when you're not using an RTOS.
193-
- When you choose (double-click) an RTOS object in the tool window, it adds a watch for the object.
194-
- When you select the start and end values for the stack pointer in the RTOS tool window, it's opened in the memory window.
195-
- We've added thread awareness for device targets to the call stack window.
210+
- When you double-click an RTOS object in the tool window, it adds a watch for the object.
211+
- When you select the start and end values for the stack pointer in the RTOS tool window, it opens in the memory window.
212+
- Added thread awareness for device targets to the call stack window.
196213
- Users can now select a pin icon next to peripherals, registers, or fields to pin them the top of the Peripheral View.
197214

198-
- We've added implementations of the remaining C++20 defect reports (also known as *backports*). All C++20 features are now available under the **`/std:c++20`** option. For more information about the implemented backports, see the [C++20 Defect Reports project](https://github.com/microsoft/STL/projects/9) in the Microsoft/STL GitHub repository and the [MSVC's STL Completes `/std:c++20`](https://devblogs.microsoft.com/cppblog/msvcs-stl-completes-stdc20/) blog post.
215+
- Added implementations of the remaining C++20 defect reports (also known as *backports*). All C++20 features are now available under the **`/std:c++20`** option. For more information about the implemented backports, see the [C++20 Defect Reports project](https://github.com/microsoft/STL/projects/9) in the Microsoft/STL GitHub repository and the [MSVC's STL Completes `/std:c++20`](https://devblogs.microsoft.com/cppblog/msvcs-stl-completes-stdc20/) blog post.
199216

200217
- We added various C++23 Library features, available under the **`/std:c++latest`** option. For more information about the new features, see the [STL Repo changelog](https://github.com/microsoft/STL/wiki/Changelog).
201218

@@ -205,7 +222,7 @@ For a summary of new features and bug fixes in Visual Studio in version 17.2, se
205222

206223
For a summary of new features and bug fixes in Visual Studio in version 17.1, see [Visual Studio 2022 version 17.1 Release Notes](/visualstudio/releases/2022/release-notes-v17.1).
207224

208-
- A new **Configure Preset** template has been added to configure and build CMake projects on a remote macOS system with *`CMakePresets.json`*. You can also launch CMake targets on a remote macOS system, and then debug remotely in the Visual Studio debugger backed by GDB or LLDB.
225+
- A new **Configure Preset** template is added to configure and build CMake projects on a remote macOS system with *`CMakePresets.json`*. You can also launch CMake targets on a remote macOS system, and then debug remotely in the Visual Studio debugger backed by GDB or LLDB.
209226

210227
- You can now debug core dumps on a remote macOS system from Visual Studio with LLDB or GDB.
211228

@@ -240,16 +257,12 @@ In Visual Studio 2022, when you start your app in the debugger, you can use the
240257

241258
### Improved CMake support
242259

243-
- We've upgraded the version of CMake shipped with Visual Studio to version 3.21. For more information on what's available in this version, see the [CMake 3.21 release notes](https://cmake.org/cmake/help/latest/release/3.21.html).
244-
245-
- CMake Overview Pages have been updated to support *`CMakePresets.json`*.
260+
- Upgraded the version of CMake shipped with Visual Studio to version 3.21. For more information on what's available in this version, see the [CMake 3.21 release notes](https://cmake.org/cmake/help/latest/release/3.21.html).
246261

262+
- CMake Overview Pages are updated to support *`CMakePresets.json`*.
247263
- You can now configure and build your CMake projects with CMake 3.21 and *`CMakePresets.json`* v3.
248-
249264
- Visual Studio now supports the `buildPresets.targets` option in *`CMakePresets.json`*. This option allows you to build a subset of targets in your CMake project.
250-
251-
- The Project menu in CMake projects has been streamlined and exposes options to "Delete Cache and Reconfigure" and "View Cache".
252-
265+
- The Project menu in CMake projects is streamlined and exposes options to "Delete Cache and Reconfigure" and "View Cache."
253266
- Implemented the **`/scanDependencies`** compiler option to list C++20 module dependencies for CMake projects, as described in [P1689R5](https://wg21.link/P1689r5). It's a step towards support for building modules-based projects with CMake and we're working on completing this support in later releases.
254267

255268
### Standard Library improvements
@@ -258,8 +271,8 @@ Select Standard Library (STL) improvements are highlighted here. For a comprehen
258271

259272
- Added debugging visualizers to improve how the following types are displayed: `source_location`, `bind_front()`, `u8string` (and its iterators), `default_sentinel_t`, `unreachable_sentinel_t`, `ranges::empty_view`, `ranges::single_view`, `ranges::iota_view` (and its iterator/sentinel), `ranges::ref_view`, `thread`, `thread::id`, `jthread`, and `filesystem::path`
260273
- Added `[[nodiscard]]` to the `stoi()` family of functions in `<string>` and to various functions in `<locale>` such as the `collate` member functions, `has_facet()`, and the `isalnum()` and `tolower()` families.
261-
- [P0980R1](https://wg21.link/P0980R1) Made `std::string` `constexpr` in VS 2019 16.10. Now it's also supported for Clang.
262-
- [P1004R2](https://wg21.link/P1004R2) Made `std::vector` `constexpr`in VS 2019 16.10. Now it's also supported for Clang.
274+
- [P0980R1](https://wg21.link/P0980R1) Made `std::string` `constexpr` in VS 2019 16.10. Now supported for Clang.
275+
- [P1004R2](https://wg21.link/P1004R2) Made `std::vector` `constexpr`in VS 2019 16.10. Now supported for Clang.
263276

264277
**Highlighted C++23 features**
265278

@@ -280,7 +293,7 @@ Select Standard Library (STL) improvements are highlighted here. For a comprehen
280293

281294
### Clang and LLVM support
282295

283-
- LLVM tools shipped with Visual Studio have been upgraded to LLVM 12. For more information, see the [LLVM release notes](https://releases.llvm.org/12.0.0/docs/ReleaseNotes.html).
296+
- LLVM tools shipped with Visual Studio are upgraded to LLVM 12. For more information, see the [LLVM release notes](https://releases.llvm.org/12.0.0/docs/ReleaseNotes.html).
284297

285298
- Clang-cl support was updated to LLVM 12.
286299

@@ -310,7 +323,7 @@ Select Standard Library (STL) improvements are highlighted here. For a comprehen
310323

311324
- Code analysis now enforces that return values of functions annotated with `_Check_return_` or `_Must_inspect_result_` must be checked.
312325

313-
- We've improved null pointer dereference detection in our code analysis tooling.
326+
- Null pointer dereference detection is improved in our code analysis tooling.
314327

315328
- Added support for `gsl::not_null` to code analysis.
316329

0 commit comments

Comments
 (0)