Skip to content

Commit 76b093d

Browse files
TaojunshenTylerMSFTprmerger-automator[bot]
authored
12/8/2023 AM Publish (#5129)
* remove duplicated section * add back link * remove duplicated section --------- Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: prmerger-automator[bot] <40007230+prmerger-automator[bot]@users.noreply.github.com>
1 parent 3c44c25 commit 76b093d

File tree

2 files changed

+5
-129
lines changed

2 files changed

+5
-129
lines changed

docs/overview/cpp-conformance-improvements.md

Lines changed: 1 addition & 106 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: 11/14/2023
4+
ms.date: 12/07/2023
55
ms.technology: "cpp-language"
66
---
77
# C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2022
@@ -119,111 +119,6 @@ namespace Gui
119119
}
120120
```
121121

122-
## <a name="improvements_178"></a> Conformance improvements in Visual Studio 2022 version 17.8
123-
124-
Visual Studio 2022 version 17.8 contains the following conformance improvements, bug fixes, and behavior changes in the Microsoft C/C++ compiler.
125-
126-
### /FU issues an error
127-
128-
The C compiler used to accept the `/FU` option, even though it hasn't support managed compilation for some time. It now issues an error. Projects that pass this option need to restrict it to C++/CLI projects only.
129-
130-
### C++ Standard Library
131-
132-
The C++23 named modules `std` and `std.compat` are now available when compiling with `/std:c++20`.
133-
134-
For a broader summary of changes made to the C++ Standard Library, see [STL Changelog VS 2022 17.8](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-178-preview-3).
135-
136-
## <a name="improvements_177"></a> Conformance improvements in Visual Studio 2022 version 17.7
137-
138-
Visual Studio 2022 version 17.7 contains the following highlighted conformance improvements, bug fixes, and behavior changes in the Microsoft C/C++ compiler.
139-
140-
### Added `/std:clatest` to the C compiler
141-
142-
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.
143-
144-
### C++ Standard Library
145-
146-
The `<print>` library is now supported. See [P2093R14 Formatted output](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2093r14.html).
147-
148-
Implemented `views::cartesian_product`.
149-
150-
For a broader summary of changes made to the Standard Template Library, see [STL Changelog VS 2022 17.7](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-177).
151-
152-
### `using` conformance
153-
154-
Previously, the `using` directive could cause names from used namespaces to remain visible when they shouldn't. This could cause unqualified name lookup to find a name in a namespace even when there's no `using` directive active.
155-
156-
Here are some examples of the new and old behavior.\
157-
References in the following comments to "(1)" mean the call to `f<K>(t)` in namespace `A`:
158-
159-
```cpp
160-
namespace A
161-
{
162-
template<typename K, typename T>
163-
auto f2(T t)
164-
{
165-
return f<K>(t); // (1) Unqualified lookup should not find anything
166-
}
167-
}
168-
169-
namespace B
170-
{
171-
template<typename K, typename T>
172-
auto f(T t) noexcept
173-
{ // Previous behavior: This function was erroneously found during unqualified lookup at (1)
174-
return A::f2<K>(t);
175-
}
176-
}
177-
178-
namespace C
179-
{
180-
template<typename T>
181-
struct S {};
182-
183-
template<typename, typename U>
184-
U&& f(U&&) noexcept; // New behavior: ADL at (1) correctly finds this function
185-
}
186-
187-
namespace D
188-
{
189-
using namespace B;
190-
191-
void h()
192-
{
193-
D::f<void>(C::S<int>());
194-
}
195-
}
196-
```
197-
198-
The same underlying issue can cause code that previously compiled to now be rejected:
199-
200-
```cpp
201-
#include <memory>
202-
namespace Addin {}
203-
namespace Gui
204-
{
205-
using namespace Addin;
206-
}
207-
208-
namespace Addin
209-
{
210-
using namespace std;
211-
}
212-
213-
// This previously compiled, but now emits error C2065 for undeclared name 'allocator'.
214-
// This should be declared as 'std::allocator<T*>' because the using directive nominating
215-
// 'std' is not active at this point.
216-
template <class T, class U = allocator<T*>>
217-
class resource_list
218-
{
219-
};
220-
221-
namespace Gui
222-
{
223-
typedef resource_list<int> intlist;
224-
}
225-
```
226-
227122
## <a name="improvements_176"></a> Conformance improvements in Visual Studio 2022 version 17.6
228123

229124
Visual Studio 2022 version 17.6 contains the following conformance improvements, bug fixes, and behavior changes in the Microsoft C/C++ compiler.

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

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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: 11/14/2023
4+
ms.date: 12/07/2023
55
ms.technology: "cpp-ide"
66
ms.custom: intro-whats-new
77
---
@@ -18,30 +18,15 @@ Briefly, some of the new features are:
1818
* 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).
1919
* 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.
2020
* 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.
21+
* Visual Studio now prompts you to mark global functions as static via a screwdriver icon that appears by the function name. Click the screwdriver icon to mark the function as static.
2222
* 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).
2323
* More Unreal Engine support:
2424
* Unreal Engine Test Adapter lets you discover, run, manage, and debug your Unreal Engine tests without leaving the Visual Studio IDE.
2525
* With Unreal Engine Code Snippets, you can find common Unreal Engine constructs as snippets in your member list.
2626
* 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.
2727
* 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.
2828

29-
For a more comprehensive summary of new C++ features in Visual Studio 17.8, see [What’s New for C++ Developers in Visual Studio 2022 17.8](https://devblogs.microsoft.com/cppblog/whats-new-for-cpp-developers-in-visual-studio-2022-17-8).\
30-
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).
31-
32-
## What's new for C++ in Visual Studio version 17.8
33-
34-
Briefly, some of the new features are:
35-
* 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).
36-
* 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.
37-
* 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`.
38-
* 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.
39-
* 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).
40-
* More Unreal Engine support:
41-
* Unreal Engine Test Adapter lets you discover, run, manage, and debug your Unreal Engine tests without leaving the Visual Studio IDE.
42-
* With Unreal Engine Code Snippets, you can find common Unreal Engine constructs as snippets in your member list.
43-
* 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.
44-
* 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.
29+
For a comprehensive summary of new C++ features in Visual Studio 17.8, see [What’s New for C++ Developers in Visual Studio 2022 17.8](https://devblogs.microsoft.com/cppblog/whats-new-for-cpp-developers-in-visual-studio-2022-17-8).
4530

4631
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).
4732

@@ -240,13 +225,9 @@ For a summary of new features and bug fixes in Visual Studio in version 17.2, se
240225
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).
241226

242227
- 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.
243-
244228
- You can now debug core dumps on a remote macOS system from Visual Studio with LLDB or GDB.
245-
246-
- The versions of [`Clang`](https://releases.llvm.org/13.0.0/tools/clang/docs/ReleaseNotes.html) and [`LLVM`](https://releases.llvm.org/13.0.0/docs/ReleaseNotes.html) shipped with Visual Studio have been upgraded to v13.
247-
229+
- The versions of [`Clang`](https://releases.llvm.org/13.0.0/tools/clang/docs/ReleaseNotes.html) and [`LLVM`](https://releases.llvm.org/13.0.0/docs/ReleaseNotes.html) shipped with Visual Studio are upgraded to v13.
248230
- Visual Studio's CMake integration is only active when a *`CMakeLists.txt`* is identified at the root of the open workspace. If a *`CMakeLists.txt`* is identified at another level of the workspace, then you're prompted to activate Visual Studio's CMake integration with a notification.
249-
250231
- New views that enable you to inspect and interact with peripheral registers on microcontrollers and real time operating systems (RTOS) objects, available through **Debug** > **Windows** > **Embedded Registers**
251232
- Added a new thread view for RTOS projects, available through **Debug** > **Windows** > **RTOS Objects**. For more information, see [Embedded Software Development in Visual Studio](https://devblogs.microsoft.com/cppblog/visual-studio-embedded-development/).
252233

0 commit comments

Comments
 (0)