Skip to content

Repo sync for protected CLA branch #3231

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 14 commits into from
Jun 30, 2021
Merged
8 changes: 4 additions & 4 deletions docs/c-language/alignment-c.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Alignment (C11)"
description: "Describes Microsoft Visual C type alignment"
ms.date: 06/22/2021
ms.date: 06/29/2021
helpviewer_keywords: ["_Alignof keyword [C]", "_Alignas keyword [C]", "memory, alignment"]
---
# Alignment (C11)
Expand Down Expand Up @@ -57,7 +57,7 @@ typedef struct
{
int value; // aligns on a 4-byte boundary. There will be 28 bytes of padding between value and alignas
alignas(32) char alignedMemory[32]; // assuming a 32 byte friendly cache alignment
} cacheFriendly; // this struct will be 32-byte aligned because alignedMemory is 32-byte alligned and is the largest alignment specified in the struct
} cacheFriendly; // this struct will be 32-byte aligned because alignedMemory is 32-byte aligned and is the largest alignment specified in the struct

int main()
{
Expand Down Expand Up @@ -123,9 +123,9 @@ int main()

## Requirements

[`/std:c11`](../build/reference/std-specify-language-standard-version.md) or later is required.
Compile with [`/std:c11`](../build/reference/std-specify-language-standard-version.md).

Requires Windows SDK 10.0.20201.0 or later. Windows SDK 10.0.20348.0 (version 2104) or later is recommended. You can download the latest SDK from the [Windows 10 SDK](https://developer.microsoft.com/windows/downloads/windows-10-sdk/) page. For more information, and instructions on how to install and use the SDK for C development, see [Install C11 and C17 support in Visual Studio](../overview/install-c17-support.md).
Windows SDK 10.0.20348.0 (version 2104) or later. See [Windows 10 SDK](https://developer.microsoft.com/windows/downloads/windows-10-sdk/) to download the latest SDK. For instructions to install and use the SDK for C11 and C17 development, see [Install C11 and C17 support in Visual Studio](../overview/install-c17-support.md).

## See also

Expand Down
8 changes: 7 additions & 1 deletion docs/c-language/generic_selection.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Generic selection (C11)"
description: "Describes the C11 _Generic keyword used in the Microsoft Visual C compiler"
ms.date: "12/9/2020"
ms.date: "6/29/2021"
helpviewer_keywords: ["_Generic keyword [C]"]
---

Expand Down Expand Up @@ -70,6 +70,12 @@ Type name: double

```

## Requirements

Compile with [`/std:c11`](../build/reference/std-specify-language-standard-version.md).

Windows SDK 10.0.20348.0 (version 2104) or later. See [Windows 10 SDK](https://developer.microsoft.com/windows/downloads/windows-10-sdk/) to download the latest SDK. For instructions to install and use the SDK for C11 and C17 development, see [Install C11 and C17 support in Visual Studio](../overview/install-c17-support.md).

## See also

[`/std` (Specify Language Standard Version)](../build/reference/std-specify-language-standard-version.md)\
Expand Down
6 changes: 5 additions & 1 deletion docs/c-language/static-assert-c.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "_Static_assert keyword and static_assert macro (C11)"
description: "Describes the C11 _Static_assert keyword and the C11 static_assert macro."
ms.date: 06/22/2021
ms.date: 06/29/2021
f1_keywords: ["static_assert_c", "_Static_assert"]
helpviewer_keywords: ["assertions [C], _Static_assert, static_assert"]
---
Expand Down Expand Up @@ -71,6 +71,10 @@ int main()
|-------------|---------------------|
|**`static_assert`**|\<assert.h>|

Compile with [`/std:c11`](../build/reference/std-specify-language-standard-version.md).

Windows SDK 10.0.20348.0 (version 2104) or later. See [Windows 10 SDK](https://developer.microsoft.com/windows/downloads/windows-10-sdk/) to download the latest SDK. For instructions to install and use the SDK for C11 and C17 development, see [Install C11 and C17 support in Visual Studio](../overview/install-c17-support.md).

## See also

[`_STATIC_ASSERT` Macro](../c-runtime-library/reference/static-assert-macro.md)\
Expand Down
8 changes: 4 additions & 4 deletions docs/c-runtime-library/tgmath.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "Type-generic math"
description: "Describes macros in <tgmath.h> that make it easier to write C code that calls the right math function, based on argument type."
description: "Describes macros in <tgmath.h> that make it easier to write C code that calls the correct math function, based on argument type."
ms.topic: "conceptual"
ms.date: "12/10/2020"
ms.date: "6/28/2021"
helpviewer_keywords: ["CRT tgmath.h"]
---

Expand Down Expand Up @@ -85,9 +85,9 @@ The following table lists the macros that are available in `<tgmath.h>` and what

## Requirements

[std:c++11](../build/reference/std-specify-language-standard-version.md) or later is required.
Compile with [`/std:c11`](../build/reference/std-specify-language-standard-version.md).

Windows SDK version 10.0.20201.0 or later. This is currently an Insider build which you can download from [Windows Insider Preview Downloads](https://www.microsoft.com/software-download/windowsinsiderpreviewSDK). See [C11 and C17: Getting Started](https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-support-arriving-in-msvc/#c11-and-c17-getting-started) for instructions on installing and using this SDK.
Windows SDK 10.0.20348.0 (version 2104) or later. See [Windows 10 SDK](https://developer.microsoft.com/windows/downloads/windows-10-sdk/) to download the latest SDK. For instructions to install and use the SDK for C11 and C17 development, see [Install C11 and C17 support in Visual Studio](../overview/install-c17-support.md).

## See also

Expand Down
4 changes: 2 additions & 2 deletions docs/overview/install-c17-support.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Install C11 and C17 support in Visual Studio
description: "Install Windows SDK and CRT support for C11 and C17 in Visual Studio"
ms.date: 06/22/2021
ms.date: 06/29/2021
helpviewer_keywords: ["Install Windows SDK support for C"]
---
# Install C11 and C17 support in Visual Studio
Expand All @@ -16,7 +16,7 @@ Support for C11 and C17 standards requires Visual Studio 2019 version 16.8 or la

Support for C11 and C17 standards is available starting in Visual Studio 2019 version 16.8. Support requires an updated Universal C Runtime (UCRT) and the latest Windows SDK updates, to work properly with the conforming preprocessor ([`/Zc:preprocessor`](../build/reference/zc-preprocessor.md)).

Windows SDK releases correspond with Windows OS releases. C11 and C17 support requires Windows SDK 10.0.20201.0 or later. Windows SDK 10.0.20348.0 (version 2104) or later is recommended. Normally, the Windows SDK is an installable option in the Individual Components tab in the Visual Studio Installer. That's the recommended way to update the SDK for use with Visual Studio. However, at the time of writing, the latest Windows SDK isn't available in the Visual Studio Installer. You can follow these steps to set up the latest SDK and build C11 or C17 code in Visual Studio or at the command line.
Windows SDK releases correspond with Windows OS releases. C11 and C17 support requires Windows SDK 10.0.20348.0 (version 2104) or later. Normally, the Windows SDK is an installable option in the Individual Components tab in the Visual Studio Installer. That's the recommended way to update the SDK for use with Visual Studio. However, at the time of writing, the latest Windows SDK isn't available in the Visual Studio Installer. You can follow these steps to set up the latest SDK and build C11 or C17 code in Visual Studio or at the command line.

## Prerequisites

Expand Down
2 changes: 1 addition & 1 deletion docs/standard-library/chrono-operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ A `duration` object.
*`Div`*\
An integral value.

*`Left`*\
*`Left`*\w
The left `duration` object.

*`Right`*\
Expand Down
15 changes: 7 additions & 8 deletions docs/standard-library/cstdalign.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
---
description: "Learn more about: &lt;cstdalign&gt;"
title: "&lt;cstdalign&gt;"
ms.date: "07/11/2019"
description: "Learn more about: <cstdalign>"
title: "<cstdalign>"
ms.date: "6/28/2021"
f1_keywords: ["<cstdalign>", "__alignas_is_defined", "__alignof_is_defined"]
helpviewer_keywords: ["cstdalign header", "__alignas_is_defined", "__alignof_is_defined"]
ms.assetid: 9d570924-d299-4225-9a58-8c4c820f5903
---
# &lt;cstdalign&gt;
# `<cstdalign>`

In some C++ standard library implementations, this header includes the C standard library header \<stdalign.h>, and adds the associated names to the `std` namespace. Because that header isn't implemented in MSVC, the \<cstdalign> header defines compatibility macros `__alignas_is_defined` and `__alignof_is_defined`.
In some C++ standard library implementations, this header includes the C standard library header `<stdalign.h>`, and adds the associated names to the `std` namespace. Because that header isn't implemented in MSVC, the `<cstdalign>` header defines compatibility macros `__alignas_is_defined` and `__alignof_is_defined`.

> [!NOTE]
> Because the \<stdalign.h> header defines macros that are keywords in C++, including it has no effect. The \<stdalign.h> header is deprecated in C++. The \<cstdalign> header is deprecated in C++17 and removed in the draft C++20 standard.
> Because the `<stdalign.h>` header defines macros that are keywords in C++, including it has no effect. The `<stdalign.h>` header is deprecated in C++. The `<cstdalign>` header is deprecated in C++17 and removed in the draft C++20 standard.

## Requirements

**Header:** \<cstdalign>
**Header:** `<cstdalign>`

**Namespace:** std

Expand Down
23 changes: 11 additions & 12 deletions docs/standard-library/ctgmath.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
---
description: "Learn more about: &lt;ctgmath&gt;"
title: "&lt;ctgmath&gt;"
ms.date: "07/11/2019"
description: "Learn more about: `<ctgmath>`"
title: "`<ctgmath>`"
ms.date: "6/28/2021"
f1_keywords: ["<ctgmath>"]
helpviewer_keywords: ["ctgmath header"]
ms.assetid: ff521893-f445-4dc8-a2f6-699185bb7024
---
# &lt;ctgmath&gt;
# `<ctgmath>`;

In effect, includes the C++ standard library headers \<complex> and \<cmath>, which provide type-generic math macros equivalent to \<tgmath.h>.
In effect, includes the C++ standard library headers `<complex>` and `<cmath>`, which provide type-generic math macros equivalent to `<tgmath.h>`.

> [!NOTE]
> The C standard library \<tgmath.h> header isn't included by \<ctgmath>, because it's effectively replaced by the C++ overloads in \<complex> and \<cmath>. That makes the \<ctgmath> header redundant. The \<tgmath.h> header is deprecated in C++. The \<ctgmath> header is deprecated in C++17 and removed in the draft C++20 standard.
> The C standard library `<tgmath.h>` header isn't included by `<ctgmath>` because it's effectively replaced by the C++ overloads in `<complex>` and `<cmath>`. That makes the `<ctgmath>` header redundant. The `<tgmath.h>` header is deprecated in C++. The `<ctgmath>` header is deprecated in C++17 and removed in the draft C++20 standard.

## Requirements

**Header:** \<ctgmath>
**Header:** `<ctgmath>`

**Namespace:** std
**Namespace:** `std`

## Remarks

The functionality of the C standard library header \<tgmath.h> is provided by the overloads in \<complex> and \<cmath>.
The functionality of the C standard library header `<tgmath.h>` is provided by the overloads in `<complex>` and `<cmath>`.

## See also

[\<complex>](complex.md)\
[\<cmath>](cmath.md)\
[`<complex>`](complex.md)\
[`<cmath>`](cmath.md)\
[Header files reference](cpp-standard-library-header-files.md)\
[C++ standard library overview](cpp-standard-library-overview.md)\
[Thread safety in the C++ standard library](thread-safety-in-the-cpp-standard-library.md)
4 changes: 4 additions & 0 deletions docs/standard-library/day-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,8 @@ Output:
## See also

[`<chrono>`](../standard-library/chrono.md)\
[`month_day` class](month-day-class.md)\
[`month_day_last` class](month-day-last-class.md)\
[`year_month_day`](year-month-day-class.md)\
[`year_month_day_last`](year-month-day-last-class.md)\
[Header Files Reference](../standard-library/cpp-standard-library-header-files.md)
8 changes: 6 additions & 2 deletions docs/standard-library/month-day-class.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Learn more about: month_day Class"
title: "month_day class"
ms.date: "6/25/2021"
ms.date: "6/28/2021"
f1_keywords: ["chrono/std::chrono::month_day", "chrono/std::chrono::month_day::day", "chrono/std::chrono::month_day::month", "chrono/std::chrono::month_day::ok"]
helpviewer_keywords: ["std::chrono [C++], month_day"]
---
Expand Down Expand Up @@ -64,6 +64,8 @@ Construct a `month_day` with a month value of *`m`*.
1\) The default constructor doesn't initialize the month or day values.\
2\) Construct a `month_day` with the month value initialized to `m` and the day value initialized to `d`.

For information about C++ 20 syntax to specify dates, see [`operator/`](chrono-operators.md#op_/)

### Example: Create a `month_day`

```cpp
Expand Down Expand Up @@ -129,6 +131,8 @@ A `month_day` is valid if the month is valid and the day is less than or equal t

[`<chrono>`](chrono.md)\
[`month` class](month-class.md)\
[`month_day` class](month-day-class.md)\
[`month_day_last` class](month-day-last-class.md)\
[`month_weekday` class](month-weekday-class.md)\
[`month_weekday_last` class](month-weekday-last-class.md)
[`month_weekday_last` class](month-weekday-last-class.md)\
[`operator/`](chrono-operators.md#op_/)
11 changes: 9 additions & 2 deletions docs/standard-library/month-day-last-class.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Learn more about: month_day_last Class"
title: "month_day_last class"
ms.date: "06/25/2021"
ms.date: "06/28/2021"
f1_keywords: ["chrono/std::chrono::month_day_last", "chrono/std::chrono::month_day_last::month", "chrono/std::chrono::month_day_last::ok"]
helpviewer_keywords: ["std::chrono [C++], month_day_last"]
---
Expand Down Expand Up @@ -53,6 +53,10 @@ constexpr explicit month_day_last(const month& m) noexcept;
*`m`*\
Construct a `month_day_last` for the month specified by *`m`*.

## Remarks

For information about C++ 20 syntax used to specify dates, see [`operator/`](chrono-operators.md#op_/)

### Example: Create a `month_day_last`

```cpp
Expand Down Expand Up @@ -102,6 +106,9 @@ constexpr bool ok() const noexcept;

[`<chrono>`](chrono.md)\
[`month` class](month-class.md)\
[`month_day` class](month-day-class.md)\
[`month_day_last` class](month-day-last-class.md)\
[`month_weekday` class](month-weekday-class.md)\
[`month_weekday_last` class](month-weekday-last-class.md)
[`month_weekday_last` class](month-weekday-last-class.md)\
[`operator/`](chrono-operators.md#op_/)
[Header Files Reference](cpp-standard-library-header-files.md)
6 changes: 5 additions & 1 deletion docs/standard-library/month-weekday-class.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Learn more about: month_weekday Class"
title: "month_weekday class"
ms.date: "06/25/2021"
ms.date: "06/28/2021"
f1_keywords: ["chrono/std::chrono::month_weekday", "chrono/std::chrono::month_weekday::weekday", "chrono/std::chrono::month_weekday::month", "chrono/std::chrono::month_weekday::ok", "chrono/std::chrono::month_weekday::weekday_indexed"]
helpviewer_keywords: ["std::chrono [C++], month_weekday"]
---
Expand Down Expand Up @@ -61,6 +61,10 @@ Construct a `month_weekday` with a month value of *`m`*.
*`wdi`*\
Construct a `month_weekday` with a weekday value of *`wdi`*.

## Remarks: Constructor

For information about C++ 20 syntax to specify dates, see [`operator/`](chrono-operators.md#op_/)

### Example: Create a `month_weekday`

```cpp
Expand Down
9 changes: 7 additions & 2 deletions docs/standard-library/month-weekday-last-class.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Learn more about: month_weekday_last Class"
title: "month_weekday_last class"
ms.date: "6/25/2021"
ms.date: "6/28/2021"
f1_keywords: ["chrono/std::chrono::month_weekday_last", "chrono/std::chrono::month_weekday_last::ok", "std::chrono::month_weekday_last::month_weekday_last", "chrono/std::chrono::month_weekday_last::ok", "chrono/std::chrono::month_weekday_last::month"]
helpviewer_keywords: ["std::chrono [C++], month_weekday_last"]
---
Expand Down Expand Up @@ -60,6 +60,10 @@ The `month` value for the created `month_weekday_last` class.
*`wdl`*\
The` weekday_last` value for the created `month_weekday_last` class.

## Remarks: Constructor

For information about C++ 20 syntax to specify dates, see [`operator/`](chrono-operators.md#op_/)

### Example: Create a `month_weekday_last`

```cpp
Expand Down Expand Up @@ -130,4 +134,5 @@ The `weekday_last` value.
[`month` class](month-class.md)\
[`month_day` class](month-day-class.md)\
[`month_day_last` class](month-day-last-class.md)\
[`month_weekday` class](month-weekday-class.md)
[`month_weekday` class](month-weekday-class.md)\
[`operator/`](chrono-operators.md#op_/)
6 changes: 4 additions & 2 deletions docs/standard-library/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@
href: ../standard-library/duration-values-structure.md
- name: hh_mm_ss class
href: ../standard-library/hhmmss-class.md
- name: high_resolution_clock struct
href: high-resolution-clock-struct.md
- name: leap_second class
href: ../standard-library/leap-second-class.md
- name: leap_second_info struct
Expand All @@ -184,10 +186,10 @@
href: ../standard-library/treat-as-floating-point-structure.md
- name: weekday class
href: weekday-class.md
- name: weekday_last class
href: weekdaylast-class.md
- name: weekday_indexed
href: weekdayindexed-class.md
- name: weekday_last class
href: weekdaylast-class.md
- name: year class
href: year-class.md
- name: year_month class
Expand Down
4 changes: 2 additions & 2 deletions docs/standard-library/weekdaylast-class.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Learn more about: weekday_last Class"
title: "weekday_last class"
ms.date: "06/25/2021"
ms.date: "06/28/2021"
f1_keywords: ["chrono/std::chrono::weekday_last", "chrono/std::chrono::weekday_last::ok", "std::chrono::weekday_last::weekday", "chrono/std::chrono::weekday_last::ok", "chrono/std::chrono::weekday_last::weekday"]
helpviewer_keywords: ["std::chrono [C++], weekday_last"]
---
Expand Down Expand Up @@ -116,7 +116,7 @@ Mon

## See also

[`<chrono>`](chrono.md)\
[`weekday` class](weekday-class.md)\
[`weekday_indexed` class](weekdayindexed-class.md)\
[`<chrono>`](chrono.md)\
[Header Files Reference](cpp-standard-library-header-files.md)
4 changes: 2 additions & 2 deletions docs/standard-library/year-class.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Learn more about: year Class"
title: "year class"
ms.date: "06/25/2021"
ms.date: "06/28/2021"
f1_keywords: ["chrono/std::chrono::year", "chrono/std::chrono::year::operator++", "chrono/std::chrono::year::operator--", "chrono/std::chrono::year::operator+=", "chrono/std::chrono::year::operator-=", "chrono/std::chrono::year::operator int", "chrono/std::chrono::year::is_leap", "chrono/std::chrono::year::max", "chrono/std::chrono::min", "chrono/std::chrono::year::ok"]
helpviewer_keywords: ["std::chrono [C++], year"]
---
Expand Down Expand Up @@ -378,10 +378,10 @@ int main()

## See also

[`<chrono>`](chrono.md)\
[`year_month`](year-month-class.md)\
[`year_month_day`](year-month-day-class.md)\
[`year_month_day_last`](year-month-day-last-class.md)\
[`year_month_weekday`](year-month-weekday-class.md)\
[`year_month_weekday_last`](year-month-weekday-last-class.md)\
[`<chrono>`](chrono.md)\
[Header Files Reference](cpp-standard-library-header-files.md)
Loading