Skip to content

Commit 7b15fae

Browse files
authored
Merge pull request MicrosoftDocs#5591 from MicrosoftDocs/main
6/10/2024 AM Publish
2 parents 1df1168 + d257358 commit 7b15fae

6 files changed

+156
-95
lines changed

docs/overview/cpp-conformance-improvements.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "C++ conformance improvements in Visual Studio 2022"
33
description: "Microsoft C++ in Visual Studio is improving standards conformance and fixing bugs regularly."
4-
ms.date: 05/31/2024
4+
ms.date: 06/06/2024
55
ms.service: "visual-cpp"
66
ms.subservice: "cpp-lang"
77
---
@@ -17,13 +17,13 @@ For changes in older versions, see [Visual C++ What's New 2003 through 2015](../
1717

1818
## <a name="improvements_1710"></a> Conformance improvements in Visual Studio 2022 version 17.10
1919

20-
Visual Studio 2022 version 17.10 contains the following conformance improvements, bug fixes, and behavior changes in the Microsoft C/C++ compiler.
20+
Visual Studio 2022 version 17.10 has the following conformance improvements, bug fixes, and behavior changes in the Microsoft C/C++ compiler.
2121

22-
For an in-depth summary of changes made to the Standard Template Library, including conformance changes, bug fixes and performance improvements, see [STL Changelog VS 2022 17.10](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1710).
22+
For an in-depth summary of changes made to the Standard Template Library, including conformance changes, bug fixes, and performance improvements, see [STL Changelog VS 2022 17.10](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1710).
2323

2424
### Conversion operator specialization with explicitly specified return type
2525

26-
The compiler used to specialize conversion operators incorrectly in some cases which could lead to a mismatched return type. These invalid specializations no longer happen. This is a source code breaking change.
26+
The compiler used to specialize conversion operators incorrectly in some cases, which could lead to a mismatched return type. These invalid specializations no longer happen. This is a source code breaking change.
2727

2828
```cpp
2929
// Example 1
@@ -87,7 +87,7 @@ After:
8787

8888
Applies to the C language (C17 and later). Also added to Microsoft Visual Studio 17.9
8989

90-
In versions of Visual C++ before Visual Studio 2022 version 17.9, if the `_Alignas` specifier appeared adjacent to a structured type in a declaration, it wasn't applied correctly according to the ISO-C Standard.
90+
In versions of Visual C++ before Visual Studio 2022 version 17.9, if the `_Alignas` specifier appeared next to a structured type in a declaration, it wasn't applied correctly according to the ISO-C Standard.
9191

9292
```cpp
9393
// compile with /std:c17
@@ -108,7 +108,7 @@ The `_Alignas` directive applies only to the member variable `member1`. It must
108108
This is a binary breaking change, so a warning is now emitted when this change takes effect. Warning C5274 is now emitted at warning level 1 for the previous example: `
109109
warning C5274: behavior change: _Alignas no longer applies to the type 'Inner' (only applies to declared data objects)`.
110110
111-
Also, in previous versions of Visual Studio, when the `_Alignas` specifier appeared adjacent to an anonymous type declaration, it was ignored.
111+
Also, in previous versions of Visual Studio, when the `_Alignas` specifier appeared next to an anonymous type declaration, it was ignored.
112112
113113
```cpp
114114
// compile with /std:c17
@@ -590,7 +590,7 @@ This rounded DOWN.
590590

591591
The C standard requires that a conforming C implementation defines `__STDC__` as `1`. Due to the behavior of the UCRT, which doesn't expose POSIX functions when `__STDC__` is `1`, it isn't possible to define this macro for C by default without introducing breaking changes to the stable language versions. Visual Studio 2022 version 17.2 and later add a conformance option [`/Zc:__STDC__`](../build/reference/zc-stdc.md) that defines this macro. There's no negative version of the option. Currently, we plan to use this option by default for future versions of C.
592592

593-
This change is a source breaking change. It applies when C11 or C17 mode is enabled, **`/std:c11`** or **`/std:c17`**, together with **`/Zc:__STDC__`**.
593+
This change is a source breaking change. It applies when C11 or C17 mode is enabled (**`/std:c11`** or **`/std:c17`**) and **`/Zc:__STDC__`** is specified.
594594

595595
#### Example
596596

6.51 KB
Loading
68 KB
Loading

docs/overview/media/hover-preview.png

41.5 KB
Loading
13.7 KB
Loading

0 commit comments

Comments
 (0)