Skip to content

Commit c516c9c

Browse files
committed
Merging changes synced from https://github.com/MicrosoftDocs/cpp-docs-pr (branch live)
2 parents 94385a7 + 44aded5 commit c516c9c

File tree

7 files changed

+33
-14
lines changed

7 files changed

+33
-14
lines changed

docs/c-runtime-library/locale.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: "Learn more about: Locale"
33
title: "Locale"
44
ms.date: "04/11/2018"
55
f1_keywords: ["c.international"]
6-
helpviewer_keywords: ["localization, locale", "country information", "language information routines", "setlocale function", "locale routines"]
6+
helpviewer_keywords: ["localization, locale", "country/region information", "language information routines", "setlocale function", "locale routines"]
77
---
88
# Locale
99

docs/preprocessor/setlocale.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ no-loc: ["pragma"]
88
---
99
# `setlocale` pragma
1010

11-
Defines the *locale*, the country, region, and language to use when translating wide-character constants and string literals.
11+
Defines the *locale*, the country/region and language to use when translating wide-character constants and string literals.
1212

1313
## Syntax
1414

docs/sanitizers/asan-runtime.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ For more information, see the [Differences with Clang 12.0](./asan.md#difference
8686
>
8787
> The option `windows_hook_rtl_allocators`, previously an opt-in feature while AddressSanitizer was experimental, is now enabled by default.
8888
89+
- `iat_overwrite`
90+
String, set to `"error"` by default. Other possible values are `"protect"` and `"ignore"`. Some modules may overwrite the [`import address table`](/windows/win32/debug/pe-format#import-address-table) of other modules to customize implementations of certain functions. For example, drivers commonly provide custom implementations for specific hardware. The `iat_overwrite` option manages the AddressSanitizer runtime's protection against overwrites for specific [`memoryapi.h`](/windows/win32/api/memoryapi/) functions. The runtime currently tracks the [`VirtualAlloc`](/windows/win32/api/memoryapi/nf-memoryapi-virtualalloc), [`VirtualProtect`](/windows/win32/api/memoryapi/nf-memoryapi-virtualprotect), and [`VirtualQuery`](/windows/win32/api/memoryapi/nf-memoryapi-virtualquery) functions for protection. This option is available in Visual Studio 2022 version 17.5 preview 1 and later versions. The following `iat_overwrite` values control how the runtime reacts when protected functions are overwritten:
91+
92+
- If set to `"error"` (the default), the runtime reports an error whenever an overwrite is detected.
93+
- If set to `"protect"`, the runtime attempts to avoid using the overwritten definition and proceeds. Effectively, the original `memoryapi` definition of the function is used from inside the runtime to avoid infinite recursion. Other modules in the process still use the overwritten definition.
94+
- If set to `"ignore"`, the runtime doesn't attempt to correct any overwritten functions and proceeds with execution.
95+
96+
8997
## <a name="intercepted_functions"></a> AddressSanitizer list of intercepted functions (Windows)
9098

9199
The AddressSanitizer runtime hot-patches many functions to enable memory safety checks at runtime. Here's a non-exhaustive list of the functions that the AddressSanitizer runtime monitors.

docs/standard-library/basic-istream-view-class.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "basic_istream_view class (C++ Standard Library)| Microsoft Docs"
33
description: "API reference for the Standard Template Library (STL) <ranges> basic_istream_view class, which reads (using operator>>) successive elements from an input stream. Also includes the istream_view and wistream_view specializations."
4-
ms.date: 11/04/2022
4+
ms.date: 11/07/2022
55
f1_keywords: ["ranges/std::basic_istream_view", "ranges/std::istream_view", "ranges/std::wistream_view", "ranges/std::basic_istream_view::begin", "ranges/std::basic_istream_view::end", "ranges/std::istream_view::begin", "ranges/std::istream_view::end", "ranges/std::wistream_view::begin", "ranges/std::wistream_view::end"]
66
helpviewer_keywords: ["std::ranges::basic_istream_view [C++]", "std::ranges::istream_view [C++]", "std::ranges::wistream_view [C++]", "std::ranges::basic_istream_view::base [C++]", "std::ranges::basic_istream_view::begin [C++]", "std::ranges::basic_istream_view::end [C++]", ]
77
dev_langs: ["C++"]
@@ -70,7 +70,7 @@ using wistream_view = ranges::basic_istream_view<Val, wchar_t>;
7070
1\) Reads elements from an input stream composed of `char` characters.\
7171
2\) Reads elements from an input stream composed of `wchar_t` characters.
7272

73-
For 1) and 2), `Val` refers to the type of the elements to extract. For example, `double` given a stream of: `"1.1 2.2 3.3"`
73+
For 1) and 2), `Val` refers to the type of the elements to extract. For example, `Val` is `double` given a stream of: `"1.1 2.2 3.3"`
7474

7575
## Members
7676

@@ -117,23 +117,28 @@ The best way to create a `basic_istream_view` is by using the [`views::istream`]
117117
### Example: `basic_istream_view`, `istream_view`, and `wistream_view`
118118
119119
```cpp
120-
121-
```cpp
122-
// requires /std:c++20 or later
123120
#include <ranges>
124121
#include <iostream>
125122
#include <sstream>
126123
127124
int main()
128125
{
129126
// range adaptor
130-
std::istringstream doubles{ "1.1 2.2 3.3 4.4 5.5" };
131-
for (const auto& elem : std::views::istream<double>(doubles))
127+
std::istringstream streamOfdoubles{ "1.1 2.2 3.3 4.4 5.5" };
128+
for (const auto& elem : std::views::istream<double>(streamOfdoubles))
132129
{
133130
std::cout << elem << ' '; // 1.1 2.2 3.3 4.4 5.5
134131
}
135132
std::cout << '\n';
136133
134+
// range adaptor - create a wistream_view
135+
std::wistringstream streamOfInts{ L"1 2 3 4 5" };
136+
for (const auto& elem : std::views::istream<int>(streamOfInts))
137+
{
138+
std::cout << elem << ' '; // 1 2 3 4 5
139+
}
140+
std::cout << '\n';
141+
137142
// istream_view alias
138143
std::istringstream cpu1{ "8 0 8 0" };
139144
// equivalent std::ranges::istream_view<int, char>
@@ -142,7 +147,7 @@ int main()
142147
std::cout << elem; // 8080
143148
}
144149
std::cout << '\n';
145-
150+
146151
// wistream_view alias
147152
std::wistringstream cpu2{ L"6 5 0 2" };
148153
// equivalent std::ranges::istream_view<int, wchar_t>
@@ -157,13 +162,14 @@ int main()
157162
std::ranges::basic_istream_view<wchar_t, wchar_t, std::char_traits<wchar_t>> basic{misc};
158163
for (const auto& elem : basic)
159164
{
160-
std::wcout << elem << ' '; // STL
165+
std::wcout << elem << ' '; // S T L
161166
}
162167
}
163168
```
164169

165170
```output
166171
1.1 2.2 3.3 4.4 5.5
172+
1 2 3 4 5
167173
8080
168174
6502
169175
S T L

docs/standard-library/range-adaptors.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
description: "Learn more about range adaptors, which create views on ranges."
33
title: "Range adaptors"
44
ms.date: 11/3/2022
5-
f1_keywords: ["ranges/std::all", "ranges/std::all_t", "ranges/std::common", "ranges/std::counted", "ranges/std::drop", "ranges/std::drop_while", "ranges/std::elements", "ranges/std::filter", "ranges/std::iota", "ranges/std::join", "ranges/std::keys", "ranges/std::lazy_split", "ranges/std::reverse", "ranges/std::split", "ranges/std::subrange", "ranges/std::take", "ranges/std::take_while", "ranges/std::transform"]
6-
helpviewer_keywords: ["std::ranges [C++], all", "std::ranges [C++], all_t", "std::ranges [C++], common", "std::ranges [C++], counted", "std::ranges [C++], drop", "std::ranges [C++], drop_while", "std::ranges [C++], elements", "std::ranges [C++], filter", "std::ranges [C++], iota", "std::ranges [C++], join", "std::ranges [C++], keys", "std::ranges [C++], lazy_split", "std::ranges [C++], reverse", "std::ranges [C++], split", "std::ranges [C++], subrange", "std::ranges [C++], take", "std::ranges [C++], take_while", "std::ranges [C++], transform"]
5+
f1_keywords: ["ranges/std::all", "ranges/std::all_t", "ranges/std::common", "ranges/std::counted", "ranges/std::drop", "ranges/std::drop_while", "ranges/std::elements", "ranges/std::empty", "ranges/std::filter", "ranges/std::iota", "ranges/std::istream", "ranges/std::join", "ranges/std::keys", "ranges/std::lazy_split", "ranges/std::reverse", "ranges/std::single", "ranges/std::split", "ranges/std::subrange", "ranges/std::take", "ranges/std::take_while", "ranges/std::transform", "ranges/std::values"]
6+
helpviewer_keywords: ["std::ranges [C++], all", "std::ranges [C++], all_t", "std::ranges [C++], common", "std::ranges [C++], counted", "std::ranges [C++], drop", "std::ranges [C++], drop_while", "std::ranges [C++], elements", "std::ranges [C++], empty", "std::ranges [C++], filter", "std::ranges [C++], iota", "std::ranges [C++], istream", "std::ranges [C++], join", "std::ranges [C++], keys", "std::ranges [C++], lazy_split", "std::ranges [C++], reverse", "std::ranges [C++], single", "std::ranges [C++], split", "std::ranges [C++], subrange", "std::ranges [C++], take", "std::ranges [C++], take_while", "std::ranges [C++], transform", "std::ranges [C++], values"]
77
---
88
# Range adaptors
99

@@ -95,8 +95,11 @@ The following range adaptors are available in the `std::views` namespace. The `s
9595
| [`drop`](#drop)<sup>C++20</sup> | Create a view from another view, skipping the specified number of elements from the front. |
9696
| [`drop_while`](#drop_while)<sup>C++20</sup> | Create a view that contains the elements of a range that remain after the leading elements that match the specified condition are dropped. |
9797
| [`elements`](#elements)<sup>C++20</sup> | Create a view of the selected index into each tuple-like value in a range. |
98+
| [`empty`](#empty)<sup>C++20</sup> | Create a view that has no elements. |
9899
| [`filter`](#filter)<sup>C++20</sup> | Create a view that contains the elements of a range that match the specified condition. |
99100
| [`iota`](#iota)<sup>C++20</sup> | Create a view that contains a sequence of increasing values. |
101+
| [`istream`](#istream)<sup>C++20</sup> | Create a view over the elements of a stream. |
102+
| [`join`](#join)<sup>C++20</sup> | Create a view that combines all the elements of multiple ranges into a single view. |
100103
| [`keys`](#keys)<sup>C++20</sup> | Create a view of the first index into each tuple-like value in a collection. |
101104
| [`lazy_split`](#lazy_split)<sup>C++20</sup> | Split a view into subranges based on a delimiter. |
102105
| [`reverse`](#reverse)<sup>C++20</sup> | Create a view of the elements of a range in reverse order. |

docs/standard-library/view-classes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ The following view classes are defined in the `std::ranges` namespace.
100100

101101
| View | Description |
102102
|--|--|
103-
| [`basic_istream_view`](basic-istream-view-class.md)<sup>C++20</sup> | A view of successive elements from an input stream. Includes `istream_view` and `wistream_view`. |
103+
| [`basic_istream_view`](basic-istream-view-class.md)<sup>C++20</sup> | A view of successive elements from an input stream. Specializations include `istream_view` and `wistream_view`. |
104104
| [`common_view`](common-view-class.md)<sup>C++20</sup> | Adapts a view that has different iterator/sentinel types into a view with the same iterator/sentinel types. |
105105
| [`drop_view`](drop-view-class.md)<sup>C++20</sup> | Created from another view, skipping the first `count` elements. |
106106
| [`drop_while_view`](drop-while-view-class.md)<sup>C++20</sup> | Created from another view, skipping leading elements as long as a predicate holds. |

docs/windows/latest-supported-vc-redist.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ helpviewer_keywords:
1111
"MSVC downloads",
1212
"[C++] downloads",
1313
]
14+
author: MahmoudGSaleh
15+
ms.author: msaleh
1416
---
1517

1618
# Microsoft Visual C++ Redistributable latest supported downloads

0 commit comments

Comments
 (0)