Skip to content

Commit 8c04d59

Browse files
committed
draft
1 parent 66de82c commit 8c04d59

File tree

2 files changed

+44
-45
lines changed

2 files changed

+44
-45
lines changed

docs/overview/msvc-conformance-improvements.md

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ ms.subservice: "cpp-lang"
77
---
88
# C++ Conformance improvements, behavior changes, and bug fixes in Microsoft C/C++ (MSVC)
99

10-
Microsoft C/C++ makes conformance improvements and bug fixes in every release. This article lists the significant improvements by MSVC Build Tools version. To jump directly to the changes for a specific version, use the **In this article** links at the top of this article.
11-
12-
This document lists changes starting in November 2025 when Visual Studio and the MSVC toolset versioning diverged.
10+
Microsoft C/C++ makes conformance improvements and bug fixes in every release. Starting with Visual Studio 2026 18.0, major improvements are organized by MSVC Build Tools version number. To jump directly to the changes for a specific version, use the **In this article** links at the top of this article.
1311

1412
For changes in earlier versions of Visual Studio:
1513

@@ -22,18 +20,18 @@ For changes in earlier versions of Visual Studio:
2220

2321
## <a name="msvc_14_50"></a> C++ conformance improvements, behavior changes, and bug fixes in MSVC Build Tools v14.50
2422

25-
MSVC Build Tools v14.50 represents a significant advancement to the MSVC compiler, bringing substantial improvements in C++23 conformance, reliability, and correctness. The extensive bug fixes and enhancements make this release particularly valuable for large-scale C++ development projects.
23+
MSVC Build Tools v14.50 introduces improvements to the MSVC compiler and Standard Library, including better C++23 standards conformance, enhanced reliability, and improved correctness. This release also includes numerous bug fixes and updates that benefit large-scale C++ development.
2624

2725
This version shipped first with Visual Studio 2026 version 18.0 and includes version 19.50 of the MSVC compiler.
2826

29-
Key highlights include:
30-
- Advanced C++23 feature support including `auto(x)` decay-copy and `#warning` directive
31-
- Comprehensive `constexpr` improvements, particularly for virtual functions
32-
- Major stability improvements for C++ modules
33-
- Extensive reliability fixes reducing internal compiler errors
34-
- Enhanced C++/CLI support for managed code scenarios
35-
- The Microsoft C++ standard library (STL) no longer supports targeting Windows 7/Server 2008 R2, Windows 8/Server 2012, or Windows 8.1/Server 2012 R2.\
36-
- Windows 10/Server 2016 are the minimum supported operating systems.\
27+
Key highlights of this release include:
28+
- Advanced C++23 feature support including `auto(x)` decay-copy and `#warning` directive.
29+
- Comprehensive `constexpr` improvements, particularly for virtual functions.
30+
- Major stability improvements for C++ modules.
31+
- Extensive reliability fixes reducing internal compiler errors.
32+
- Enhanced C++/CLI support for managed code scenarios.
33+
- The Microsoft C++ standard library (MSVC STL) no longer supports targeting Windows 7/Server 2008 R2, Windows 8/Server 2012, or Windows 8.1/Server 2012 R2.
34+
- Windows 10/Server 2016 are the minimum supported operating systems.
3735

3836
For more information about performance improvements, bug fixes, and conformance updates in the Standard Library, see [STL Changelog](https://github.com/microsoft/STL/wiki/Changelog), which is updated regularly.
3937

@@ -45,10 +43,10 @@ MSVC Build Tools v14.50 adds support for several C++23 features, bringing the co
4543

4644
[P0849R8](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p0849r8.html) introduces the `auto(x)` syntax for decay-copy operations directly in the language, providing a more concise way to express decay-copy semantics.
4745

48-
Prior to P0849R8, you needed to explicitly perform decay operations:
46+
Before P0849R8, you needed to explicitly perform decay operations:
4947

5048
```cpp
51-
// Prior to P0849R8:
49+
// Before P0849R8:
5250
void pop_front_alike(auto& x)
5351
{
5452
using T = std::decay_t<decltype(x.front())>;
@@ -73,7 +71,7 @@ This feature provides a standardized way to perform decay-copy operations, makin
7371
[P2437R1](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2437r1.pdf) implements the C++23 `#warning` preprocessor directive, providing a standard way to emit warnings during compilation.
7472

7573
```cpp
76-
// Valid prior to C++23.
74+
// Valid before C++23.
7775
#error bad configuration...
7876

7977
// Valid after C++23.
@@ -118,7 +116,7 @@ void g()
118116
}
119117
```
120118
121-
In C++20, and earlier, this code would have compiled because even though the type of `t` is `S&&` the use of `t` in `return t` is treated as a glvalue and so it can bind to the return type.\
119+
In C++20, and earlier, this code compiled because even though the type of `t` is `S&&` the use of `t` in `return t` is treated as a glvalue and so it can bind to the return type.\
122120
With C++23, `t` is treated as an xvalue and so it can't bind to an lvalue reference.\
123121
One fix is to change to the return type of the function from `T&` to `T&&` but this may affect code that calls this function. An alternative is to use the feature test macro that is associated with this change. For example:
124122
@@ -157,27 +155,27 @@ void check(int const (&param)[3])
157155
158156
This improvement allows more code to be evaluated at compile time, particularly when dealing with function parameters in template contexts.
159157
160-
## Conformance Enhancements
158+
## Conformance enhancements
161159
162-
Improved adherence to C++ standards:
160+
Improved adherence to C++ standards includes better handling of attributes, templates, and C++20/C++23 features.
163161
164-
### Attribute Support
162+
### Attribute support
165163
166164
- Added support for [`[[maybe_unused]]` on labels](https://developercommunity.visualstudio.com/t/unreferenced-label-when-ref-hidden-by-if/102076).
167165
- Fixed warning C4102 (unreferenced label) when the only reference was from a discarded `if constexpr` branch.
168166
169-
### Template and Specialization Fixes
167+
### Template and specialization fixes
170168
171169
- [Diagnosed ill-formed friend explicit specializations](https://developercommunity.visualstudio.com/t/Defining-explicit-function-template-spec/10933841) that were incorrectly accepted in C++20 or later.
172-
- Added `/Zc:enumEncoding` switch to [correctly encode enum non-type template parameters](https://developercommunity.visualstudio.com/t/Overload-resolution-fails-for-enum-non-t/10398088).
170+
- Added `/Zc:enumEncoding` switch to [correctly encode enum nontype template parameters](https://developercommunity.visualstudio.com/t/Overload-resolution-fails-for-enum-non-t/10398088).
173171
- Fixed issues with [missing 'template' keyword diagnostics](https://developercommunity.visualstudio.com/t/No-diagnostic-for-missing-template-in-d/10501221)
174172
175173
### C++20 and C++23 Features
176174
177175
- Enhanced [multidimensional operator[] support](https://developercommunity.visualstudio.com/t/Multidimensional-operator-with-Wall-r/10876026)
178-
- Improved [concept and constraint evaluation](https://developercommunity.visualstudio.com/t/VS-1714-if-constexpr-requires--does/10905731)-
176+
- Improved [concept and constraint evaluation](https://developercommunity.visualstudio.com/t/VS-1714-if-constexpr-requires--does/10905731)
179177
180-
### Smaller Conformance Updates
178+
### Smaller conformance updates
181179
182180
MSVC Build Tools v14.50 includes numerous smaller conformance improvements that enhance C++ standard compliance:
183181
@@ -196,15 +194,15 @@ MSVC Build Tools v14.50 includes numerous smaller conformance improvements that
196194
197195
## Bug fixes
198196
199-
Bug fixes for C++ Modules, `constexpr`, and other fixes were made in v14.50.
197+
Bug fixes for C++ Modules, `constexpr`, and other fixes were made in MSVC v14.50.
200198
201-
For a detailed list of bug fixes, see [Compiler Improvements in v14.50](https://devblogs.microsoft.com/cppblog/c-language-updates-in-msvc-build-tools-v14-50/#compiler-improvements-in-v14.50)
199+
For a detailed list of bug fixes, see [Compiler Improvements in v14.50](https://devblogs.microsoft.com/cppblog/c-language-updates-in-msvc-build-tools-v14-50/#compiler-improvements-in-v14.50).
202200
203-
**Encoding of certain non-type template arguments corrected**
201+
**Encoding of certain nontype template arguments corrected**
204202
205203
Affects `/stdc++20` or later.
206204
207-
Certain non-type pointer type template arguments involving sub-objects could lead to linking issues or in some cases silent bad code generation where what should be distinct specializations collide.
205+
Certain nontype pointer type template arguments involving subobjects could lead to linking issues or in some cases silent bad code generation where what should be distinct specializations collide.
208206
209207
```cpp
210208
struct A
@@ -236,33 +234,34 @@ With this fix, the two calls to `f` get distinct encodings, as required.
236234

237235
When upgrading to MSVC Build Tools v14.50, consider the following potential breaking changes and migration guidance:
238236

239-
### C++23 Feature Adoption
237+
### C++23 feature adoption
240238
- Update code to take advantage of new `auto(x)` decay-copy syntax for cleaner template code
241239
- Consider using `#warning` directives for deprecation notices instead of error-prone conditional compilation
242240
- Review explicit object parameter usage in operators for improved consistency
243241

244-
### `constexpr` Improvements
242+
### `constexpr` improvements
245243
- Existing `constexpr` code may now compile that previously failed, particularly with virtual functions
246244
- Review constant evaluation code for potential new optimization opportunities
247245
- Update CRTP patterns that may now work correctly with static constexpr members
248246

249-
### Modules Migration
247+
### Modules migration
250248
- Projects using C++20 modules should see improved stability and compatibility
251249
- Header units now work more reliably with large codebases like Unreal Engine 5
252250
- Consider migrating from traditional headers to modules for better compilation performance
253251

254-
### Compiler Diagnostics
252+
### Compiler diagnostics
255253
- New warnings may appear for previously undiagnosed issues
256254
- Review enum type usage if using `/Zc:enumTypes`
257255
- Update code that relies on implicit conversions that may now be flagged
258256

259-
### C Code Updates
257+
### C code updates
260258
- C23 features are available with `/std:clatest`
261259
- `typeof` behavior changes may affect existing code
262260
- Review preprocessor usage for new `__VA_OPT__` availability
263261

262+
## Provide feedback
264263

265-
For the latest updates and to provide feedback, please visit the [Visual Studio Developer Community](https://developercommunity.visualstudio.com/) or contact the team at [[email protected]](mailto:[email protected]). Follow us on Twitter [@visualc](https://twitter.com/visualc) or BlueSky [@msftcpp.bsky.social](https://bsky.app/profile/msftcpp.bsky.social).
264+
For the latest updates and to provide feedback, visit the [Visual Studio Developer Community](https://developercommunity.visualstudio.com/) or contact the team at [[email protected]](mailto:[email protected]). Follow us on Twitter [@visualc](https://twitter.com/visualc) or BlueSky [@msftcpp.bsky.social](https://bsky.app/profile/msftcpp.bsky.social).
266265

267266
If you encounter problems with MSVC in Visual Studio 2026, please let us know via the [Report a Problem](how-to-report-a-problem-with-the-visual-cpp-toolset.md) option, either from the installer or the Visual Studio IDE itself.
268267

0 commit comments

Comments
 (0)