Skip to content

Commit 87bacc8

Browse files
Merge pull request #4691 from MicrosoftDocs/main638288404531593506sync_temp
For protected CLA branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents ab21198 + de33fdf commit 87bacc8

File tree

2 files changed

+39
-12
lines changed

2 files changed

+39
-12
lines changed

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

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,43 @@
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: 02/28/2023
4+
ms.date: 08/23/2023
55
ms.technology: "cpp-ide"
66
ms.custom: intro-whats-new
77
---
8+
89
# What's new for C++ in Visual Studio 2022
910

1011
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.
1112

1213
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)
1314

15+
## What's new for C++ in Visual Studio version 17.7
16+
17+
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/).
18+
19+
Briefly, some of the new features are: faster debugging sessions and faster project load times, step-by-step visualization of macro expansion, one-click download for Windows Subsystem for Linux (WSL), improved support for Doxygen comments, C++ Build Insights for game development, and Unreal Engine project improvements such as faster IntelliSense and syntax colorization, the ability to find all Unreal Engine Blueprint references, and more.
20+
21+
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)
22+
23+
For a summary of new features in the Visual Studio 17.7 IDE, see[Visual Studio 2022 version 17.7 Release Notes](/visualstudio/releases/2022/release-notes).
24+
25+
## What's new for C++ in Visual Studio version 17.6
26+
27+
For a summary of new C++ features in Visual Studio 17.6, see [What’s New for C++ Developers in Visual Studio 2022 17.6](https://devblogs.microsoft.com/cppblog/visual-studio-17-6-for-cpp-devs/).
28+
29+
Briefly, some of the new features are: CMake script debugging, built-in support for High Level Shading Language (HLSL), an Unreal Engine Log viewer, initial support for C++20 in C++/CLI projects, vcpkg is now added by default, and some C++23 standard library features for ranges. To see a full list of new features added to the standard library, see the [STL changelog](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-176).
30+
31+
For a summary of new features in Visual Studio 17.6 IDE, see [Visual Studio 2022 version 17.6 Release Notes](/visualstudio/releases/2022/release-notes-v17.6).
32+
1433
## What's new for C++ in Visual Studio version 17.5
1534

16-
For a summary of new features and bug fixes in Visual Studio in version 17.5, see [Visual Studio 2022 version 17.5 Release Notes](/visualstudio/releases/2022/release-notes-v17.5).
35+
For a summary of new C++ features in Visual Studio in version 17.5, see [What’s New for C++ Developers in Visual Studio 2022 17.5](https://devblogs.microsoft.com/cppblog/visual-studio-17-5-for-cpp-devs/).
36+
For a summary of new features and bug fixes in the Visual Studio IDE version 17.5, see [Visual Studio 2022 version 17.5 Release Notes](/visualstudio/releases/2022/release-notes-v17.5).
1737

1838
- `std::move`, `std::forward`, `std::move_if_noexcept`, and `std::forward_like` now don't produce function calls in generated code, even in debug mode. This change avoids named casts causing unnecessary overhead in debug builds. `/permissive-` (or an option that implies it, such as `/std:c++20` or `std:c++latest`) is required.
1939

20-
- Added [`[[msvc::intrinsic]]`](../cpp/attributes.md#msvcintrinsic) to support the above item. You can apply this attribute to non-recursive functions consisting of a single cast, which take only one parameter.
40+
- Added [`[[msvc::intrinsic]]`](../cpp/attributes.md#msvcintrinsic) to support the above item. You can apply this attribute to nonrecursive functions consisting of a single cast, which take only one parameter.
2141

2242
- Added support for Linux Console in the Integrated Terminal, which allows for terminal I/O.
2343

@@ -67,7 +87,7 @@ For a summary of new features and bug fixes in Visual Studio in version 17.5, se
6787

6888
## What's new for C++ in Visual Studio version 17.4
6989

70-
For a summary of new features and bug fixes in Visual Studio in version 17.4, see [Visual Studio 2022 version 17.4 Release Notes](/visualstudio/releases/2022/release-notes-v17.4).
90+
For a summary of new features and bug fixes in Visual Studio in version 17.4, see [Visual Studio 2022 version 17.4 Release Notes](/visualstudio/releases/2022/release-notes-v17.4) and [What’s New for C++ Developers in Visual Studio 2022 17.4](https://devblogs.microsoft.com/cppblog/whats-new-for-cpp-developers-in-visual-studio-2022-17-4/).
7191

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

@@ -88,7 +108,7 @@ For a summary of new features and bug fixes in Visual Studio in version 17.4, se
88108

89109
- You can now use Dev Containers for your C++ projects. Learn more about this feature in our [Dev Containers for C++](https://aka.ms/vscppdevcontainer) blog post.
90110

91-
- IntelliSense now respects the order of pre-included headers when one is a PCH. Previously, when a PCH was used via **`/Yu`** and force-included via **`/FI`**, IntelliSense would always process it first, before any other headers included via **`/FI`**. This behavior didn't match the build behavior. With this change, **`/FI`** headers are processed in the order they're specified.
111+
- IntelliSense now respects the order of preincluded headers when one of them is a PCH. Previously, when a PCH was used via **`/Yu`** and force-included via **`/FI`**, IntelliSense would always process it first, before any other headers included via **`/FI`**. This behavior didn't match the build behavior. With this change, **`/FI`** headers are processed in the order they're specified.
92112

93113
- Removed internal prefixes from CTest names in Test Explorer.
94114

@@ -123,7 +143,7 @@ For a summary of new features and bug fixes in Visual Studio in version 17.4, se
123143

124144
## What's new for C++ in Visual Studio version 17.3
125145

126-
For a summary of new features and bug fixes in Visual Studio in version 17.3, see [Visual Studio 2022 version 17.3 Release Notes](/visualstudio/releases/2022/release-notes-v17.3).
146+
For a summary of new features and bug fixes in Visual Studio in version 17.3, see [Visual Studio 2022 version 17.3 Release Notes](/visualstudio/releases/2022/release-notes-v17.3) and [C++ improvements](https://devblogs.microsoft.com/visualstudio/visual-studio-2022-17-3-is-now-available/#c-improvements).
127147

128148
- The Arm64EC toolchain is no longer marked as experimental and is ready for production use.
129149

@@ -187,9 +207,8 @@ For a summary of new features and bug fixes in Visual Studio in version 17.1, se
187207

188208
- 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.
189209

190-
- Added a new register visualization window for embedded targets, available through **Debug** > **Windows** > **Embedded Registers**.
191-
192-
- Added a new thread view for RTOS projects, available through **Debug** > **Windows** > **RTOS Objects**.
210+
- 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**
211+
- 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/).
193212

194213
## What's new for C++ in Visual Studio version 17.0
195214

docs/standard-library/vector-class.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "vector class"
33
description: "Reference for Microsoft C++ Standard library implementation of class vector."
4-
ms.date: "02/23/2021"
4+
ms.date: "08/25/2023"
55
f1_keywords: ["vector/std::vector::allocator_type", "vector/std::vector::const_iterator", "vector/std::vector::const_pointer", "vector/std::vector::const_reference", "vector/std::vector::const_reverse_iterator", "vector/std::vector::difference_type", "vector/std::vector::iterator", "vector/std::vector::pointer", "vector/std::vector::reference", "vector/std::vector::reverse_iterator", "vector/std::vector::size_type", "vector/std::vector::value_type", "vector/std::vector::assign", "vector/std::vector::at", "vector/std::vector::back", "vector/std::vector::begin", "vector/std::vector::capacity", "vector/std::vector::cbegin", "vector/std::vector::cend", "vector/std::vector::crbegin", "vector/std::vector::crend", "vector/std::vector::clear", "vector/std::vector::data", "vector/std::vector::emplace", "vector/std::vector::emplace_back", "vector/std::vector::empty", "vector/std::vector::end", "vector/std::vector::erase", "vector/std::vector::front", "vector/std::vector::get_allocator", "vector/std::vector::insert", "vector/std::vector::max_size", "vector/std::vector::pop_back", "vector/std::vector::push_back", "vector/std::vector::rbegin", "vector/std::vector::rend", "vector/std::vector::reserve", "vector/std::vector::resize", "vector/std::vector::shrink_to_fit", "vector/std::vector::size", "vector/std::vector::swap"]
66
helpviewer_keywords: ["std::vector [C++], allocator_type", "std::vector [C++], const_iterator", "std::vector [C++], const_pointer", "std::vector [C++], const_reference", "std::vector [C++], const_reverse_iterator", "std::vector [C++], difference_type", "std::vector [C++], iterator", "std::vector [C++], pointer", "std::vector [C++], reference", "std::vector [C++], reverse_iterator", "std::vector [C++], size_type", "std::vector [C++], value_type", "std::vector [C++], assign", "std::vector [C++], at", "std::vector [C++], back", "std::vector [C++], begin", "std::vector [C++], capacity", "std::vector [C++], cbegin", "std::vector [C++], cend", "std::vector [C++], crbegin", "std::vector [C++], crend", "std::vector [C++], clear", "std::vector [C++], data", "std::vector [C++], emplace", "std::vector [C++], emplace_back", "std::vector [C++], empty", "std::vector [C++], end", "std::vector [C++], erase", "std::vector [C++], front", "std::vector [C++], get_allocator", "std::vector [C++], insert", "std::vector [C++], max_size", "std::vector [C++], pop_back", "std::vector [C++], push_back", "std::vector [C++], rbegin", "std::vector [C++], rend", "std::vector [C++], reserve", "std::vector [C++], resize", "std::vector [C++], shrink_to_fit", "std::vector [C++], size", "std::vector [C++], swap"]
77
---
@@ -114,7 +114,7 @@ typedef Allocator allocator_type;
114114

115115
### Example
116116

117-
See the example for [get_allocator](#get_allocator) for an example that uses `allocator_type`.
117+
See the example for [`get_allocator`](#get_allocator) for an example that uses `allocator_type`.
118118

119119
## <a name="assign"></a> `assign`
120120

@@ -2133,6 +2133,7 @@ int main()
21332133
}
21342134
cout << endl;
21352135
2136+
cout << "v8 =";
21362137
vector<int> v8{ { 1, 2, 3, 4 } };
21372138
for (auto& v : v8){
21382139
cout << " " << v ;
@@ -2142,7 +2143,14 @@ int main()
21422143
```
21432144

21442145
```Output
2145-
v1 = 0 0 0v2 = 2 2 2 2 2v3 = 1 1 1v4 = 2 2 2 2 2v5 = 0 1 2 3 4v6 = 1 2v7 = 2 2 2 2 21 2 3 4
2146+
v1 = 0 0 0
2147+
v2 = 2 2 2 2 2
2148+
v3 = 1 1 1
2149+
v4 = 2 2 2 2 2
2150+
v5 = 0 0 0 0 0
2151+
v6 = 0 0
2152+
v7 = 2 2 2 2 2
2153+
v8 = 1 2 3 4
21462154
```
21472155

21482156
## See also

0 commit comments

Comments
 (0)