Skip to content

Repo sync for protected CLA branch #4273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/c-runtime-library/locale.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: "Learn more about: Locale"
title: "Locale"
ms.date: "04/11/2018"
f1_keywords: ["c.international"]
helpviewer_keywords: ["localization, locale", "country information", "language information routines", "setlocale function", "locale routines"]
helpviewer_keywords: ["localization, locale", "country/region information", "language information routines", "setlocale function", "locale routines"]
---
# Locale

Expand Down
2 changes: 1 addition & 1 deletion docs/preprocessor/setlocale.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ no-loc: ["pragma"]
---
# `setlocale` pragma

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

## Syntax

Expand Down
8 changes: 8 additions & 0 deletions docs/sanitizers/asan-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ For more information, see the [Differences with Clang 12.0](./asan.md#difference
>
> The option `windows_hook_rtl_allocators`, previously an opt-in feature while AddressSanitizer was experimental, is now enabled by default.

- `iat_overwrite`
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:

- If set to `"error"` (the default), the runtime reports an error whenever an overwrite is detected.
- 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.
- If set to `"ignore"`, the runtime doesn't attempt to correct any overwritten functions and proceeds with execution.


## <a name="intercepted_functions"></a> AddressSanitizer list of intercepted functions (Windows)

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.
Expand Down
24 changes: 15 additions & 9 deletions docs/standard-library/basic-istream-view-class.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "basic_istream_view class (C++ Standard Library)| Microsoft Docs"
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."
ms.date: 11/04/2022
ms.date: 11/07/2022
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"]
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++]", ]
dev_langs: ["C++"]
Expand Down Expand Up @@ -70,7 +70,7 @@ using wistream_view = ranges::basic_istream_view<Val, wchar_t>;
1\) Reads elements from an input stream composed of `char` characters.\
2\) Reads elements from an input stream composed of `wchar_t` characters.

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"`
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"`

## Members

Expand Down Expand Up @@ -117,23 +117,28 @@ The best way to create a `basic_istream_view` is by using the [`views::istream`]
### Example: `basic_istream_view`, `istream_view`, and `wistream_view`

```cpp

```cpp
// requires /std:c++20 or later
#include <ranges>
#include <iostream>
#include <sstream>

int main()
{
// range adaptor
std::istringstream doubles{ "1.1 2.2 3.3 4.4 5.5" };
for (const auto& elem : std::views::istream<double>(doubles))
std::istringstream streamOfdoubles{ "1.1 2.2 3.3 4.4 5.5" };
for (const auto& elem : std::views::istream<double>(streamOfdoubles))
{
std::cout << elem << ' '; // 1.1 2.2 3.3 4.4 5.5
}
std::cout << '\n';

// range adaptor - create a wistream_view
std::wistringstream streamOfInts{ L"1 2 3 4 5" };
for (const auto& elem : std::views::istream<int>(streamOfInts))
{
std::cout << elem << ' '; // 1 2 3 4 5
}
std::cout << '\n';

// istream_view alias
std::istringstream cpu1{ "8 0 8 0" };
// equivalent std::ranges::istream_view<int, char>
Expand All @@ -142,7 +147,7 @@ int main()
std::cout << elem; // 8080
}
std::cout << '\n';

// wistream_view alias
std::wistringstream cpu2{ L"6 5 0 2" };
// equivalent std::ranges::istream_view<int, wchar_t>
Expand All @@ -157,13 +162,14 @@ int main()
std::ranges::basic_istream_view<wchar_t, wchar_t, std::char_traits<wchar_t>> basic{misc};
for (const auto& elem : basic)
{
std::wcout << elem << ' '; // STL
std::wcout << elem << ' '; // S T L
}
}
```

```output
1.1 2.2 3.3 4.4 5.5
1 2 3 4 5
8080
6502
S T L
Expand Down
7 changes: 5 additions & 2 deletions docs/standard-library/range-adaptors.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
description: "Learn more about range adaptors, which create views on ranges."
title: "Range adaptors"
ms.date: 11/3/2022
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"]
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"]
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"]
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"]
---
# Range adaptors

Expand Down Expand Up @@ -95,8 +95,11 @@ The following range adaptors are available in the `std::views` namespace. The `s
| [`drop`](#drop)<sup>C++20</sup> | Create a view from another view, skipping the specified number of elements from the front. |
| [`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. |
| [`elements`](#elements)<sup>C++20</sup> | Create a view of the selected index into each tuple-like value in a range. |
| [`empty`](#empty)<sup>C++20</sup> | Create a view that has no elements. |
| [`filter`](#filter)<sup>C++20</sup> | Create a view that contains the elements of a range that match the specified condition. |
| [`iota`](#iota)<sup>C++20</sup> | Create a view that contains a sequence of increasing values. |
| [`istream`](#istream)<sup>C++20</sup> | Create a view over the elements of a stream. |
| [`join`](#join)<sup>C++20</sup> | Create a view that combines all the elements of multiple ranges into a single view. |
| [`keys`](#keys)<sup>C++20</sup> | Create a view of the first index into each tuple-like value in a collection. |
| [`lazy_split`](#lazy_split)<sup>C++20</sup> | Split a view into subranges based on a delimiter. |
| [`reverse`](#reverse)<sup>C++20</sup> | Create a view of the elements of a range in reverse order. |
Expand Down
2 changes: 1 addition & 1 deletion docs/standard-library/view-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ The following view classes are defined in the `std::ranges` namespace.

| View | Description |
|--|--|
| [`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`. |
| [`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`. |
| [`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. |
| [`drop_view`](drop-view-class.md)<sup>C++20</sup> | Created from another view, skipping the first `count` elements. |
| [`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. |
Expand Down
2 changes: 2 additions & 0 deletions docs/windows/latest-supported-vc-redist.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ helpviewer_keywords:
"MSVC downloads",
"[C++] downloads",
]
author: MahmoudGSaleh
ms.author: msaleh
---

# Microsoft Visual C++ Redistributable latest supported downloads
Expand Down