Skip to content

Commit 7701a5f

Browse files
author
Colin Robertson
authored
Merge pull request MicrosoftDocs#3283 from MicrosoftDocs/master637638682701050873
Repo sync for protected CLA branch
2 parents d55905f + 25cc1a8 commit 7701a5f

File tree

97 files changed

+264
-409
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+264
-409
lines changed

docs/atl-mfc-shared/reference/coledatetime-class.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,10 @@ The `COleDateTime` object to be compared.
128128
> [!NOTE]
129129
> An ATLASSERT will occur if either of the two operands is invalid.
130130
131-
### Example
131+
### Examples
132132

133133
[!code-cpp[NVC_ATLMFC_Utilities#13](../../atl-mfc-shared/codesnippet/cpp/coledatetime-class_2.cpp)]
134134

135-
### Example
136-
137135
The operators **>=**, **\<=**, **>**, and **<**, will assert if the `COleDateTime` object is set to null.
138136

139137
[!code-cpp[NVC_ATLMFC_Utilities#170](../../atl-mfc-shared/codesnippet/cpp/coledatetime-class_3.cpp)]

docs/atl-mfc-shared/reference/crect-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ BOOL EqualRect(LPCRECT lpRect) const throw();
396396
### Parameters
397397
398398
*`lpRect`*<br/>
399-
Points to a [`RECT](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` object that contains the upper-left and lower-right corner coordinates of a rectangle.
399+
Points to a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure or `CRect` object that contains the upper-left and lower-right corner coordinates of a rectangle.
400400
401401
### Return Value
402402

docs/atl-mfc-shared/reference/csimplestringt-class.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,6 @@ _tprintf_s(_T("Alloc length is %d, String length is %d\n"),
337337
str.GetAllocLength(), str.GetLength());
338338
```
339339
340-
### Remarks
341-
342340
The output from this example is as follows:
343341
344342
```Output

docs/atl/programming-with-ccombstr-atl.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ Although several `CComBSTR` methods will automatically convert an ANSI string ar
2727

2828
[!code-cpp[NVC_ATL_Utilities#114](../atl/codesnippet/cpp/programming-with-ccombstr-atl_1.cpp)]
2929

30-
If you are using a string literal to modify a `CComBSTR` object, use wide character strings. This will reduce unnecessary conversions.
31-
32-
### Example
30+
If you're using a string literal to modify a `CComBSTR` object, use wide character strings to reduce unnecessary conversions.
3331

3432
[!code-cpp[NVC_ATL_Utilities#115](../atl/codesnippet/cpp/programming-with-ccombstr-atl_2.cpp)]
3533

docs/atl/reference/cwindow-class.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -874,9 +874,7 @@ BOOL GetDlgItemText(
874874
875875
### Remarks
876876
877-
See [GetDlgItemText](/windows/win32/api/winuser/nf-winuser-getdlgitemtextw) in the Windows SDK.
878-
879-
### Remarks
877+
For more information, see [`GetDlgItemText`](/windows/win32/api/winuser/nf-winuser-getdlgitemtextw) in the Windows SDK.
880878
881879
The second version of this method allows you to copy the control's text to a BSTR. This version returns TRUE if the text is successfully copied; otherwise, FALSE.
882880
@@ -1209,9 +1207,7 @@ LONG_PTR GetWindowLongPtr(int nIndex) const throw();
12091207
12101208
### Remarks
12111209
1212-
See [GetWindowLongPtr](/windows/win32/api/winuser/nf-winuser-getwindowlongptrw) in the Windows SDK.
1213-
1214-
### Remarks
1210+
For more information, see [`GetWindowLongPtr`](/windows/win32/api/winuser/nf-winuser-getwindowlongptrw) in the Windows SDK.
12151211
12161212
If you are retrieving a pointer or a handle, this function supersedes the `CWindow::GetWindowLong` method.
12171213
@@ -1429,9 +1425,7 @@ void InvalidateRgn(HRGN hRgn, BOOL bErase = TRUE) throw();
14291425
14301426
### Remarks
14311427
1432-
See [InvalidateRgn](/windows/win32/api/winuser/nf-winuser-invalidatergn) in the Windows SDK.
1433-
1434-
### Remarks
1428+
For more information, see [`InvalidateRgn`](/windows/win32/api/winuser/nf-winuser-invalidatergn) in the Windows SDK.
14351429
14361430
Specifies a **`void`** return type, while the `InvalidateRgn` Win32 function always returns TRUE.
14371431

docs/build/reference/headername.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,20 @@ If you specify **`/headerName:{quote,angle}`**, you must also specify [`/exportH
3636
Given a project that references a header file it defines called `m.h`, the compiler option to compile it into a header unit looks similar to this:
3737

3838
```Bash
39-
$ cl /std:c++latest /exportHeader /headerName:quote m.h /Fom.h.obj
39+
cl /std:c++latest /exportHeader /headerName:quote m.h /Fom.h.obj
4040
```
4141

4242
The `/headerName:{quote,angle}`switch acts like a flag and does not explicitly need an argument. The following examples are valid:
4343

4444
```Bash
45-
$ cl /std:c++latest /exportHeader /headerName:angle /MP /Fo.\ vector iostream algorithm
46-
$ cl /std:c++latest /exportHeader /headerName:quote /MP /Fo.\ my-utilities.h a/b/my-core.h
45+
cl /std:c++latest /exportHeader /headerName:angle /MP /Fo.\ vector iostream algorithm
46+
cl /std:c++latest /exportHeader /headerName:quote /MP /Fo.\ my-utilities.h a/b/my-core.h
4747
```
4848

4949
You can specify multiple `/headerName` switches on the same command line, and every argument after that switch will be processed with the specified *`header-filename`* lookup rules. The following example processes all the headers as the previous two command line examples in the same way. It looks up the headers using the lookup rules applied as if they had been specified as: `#include <vector>`, `#include "my-utilties.h"`, and `#include "a/b/my-core.h"`:
5050

5151
```bash
52-
$ cl /std:c++latest /exportHeader /headerName:angle /MP /Fo.\ vector iostream algorithm /headerName:quote my-utilities.h a/b/my-core.h
52+
cl /std:c++latest /exportHeader /headerName:angle /MP /Fo.\ vector iostream algorithm /headerName:quote my-utilities.h a/b/my-core.h
5353
```
5454

5555
### To set this compiler option in the Visual Studio development environment

docs/build/reference/module-exportheader.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The argument to `/exportHeader` is a `/headerName` command-line option that spec
2525

2626
**`/exportHeader`** is available starting in Visual Studio 2019 version 16.10 Preview 2.
2727

28-
The **`/exportHeader`** compiler option requires you enable the [/std:c++latest](std-specify-language-standard-version.md) option.
28+
The **`/exportHeader`** compiler option requires you enable the [`/std:c++latest`](std-specify-language-standard-version.md) option.
2929

3030
One **`/exportHeader`** compiler option can specify as many header-name arguments as your build requires. You don't need to specify them separately.
3131

docs/build/reference/sourcedependencies-directives.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,4 @@ You normally shouldn't set this yourself in the Visual Studio development enviro
101101
## See also
102102

103103
[MSVC compiler options](compiler-options.md)\
104-
[MSVC compiler command-line syntax](compiler-command-line-syntax.md)
104+
[MSVC compiler command-line syntax](compiler-command-line-syntax.md)

docs/build/reference/translateinclude.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ To enable `/translateInclude`, set the **Translate Includes to Imports** option
6969
1. Change the **Translate Includes to Imports** dropdown to **Yes**
7070
![Screenshot of the Property Pages dialog with the Translate Includes to Imports property highlighted.](../media/vs2019-translate-includes-option.png)
7171

72-
7372
## See also
7473

7574
[`/headerUnit` (Use header unit IFC)](headerunit.md).\

docs/build/reference/vmm-vms-vmv-general-purpose-representation.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ When you specify one of these inheritance-model options, that model gets used fo
5454

5555
1. Enter the compiler option in the **Additional Options** box.
5656

57-
5857
### To set this compiler option programmatically
5958

6059
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.AdditionalOptions%2A>.

docs/build/walkthrough-compiling-a-native-cpp-program-on-the-command-line.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Before you can build a C or C++ program on the command line, verify that the too
9898
```
9999

100100
The dates and other details will differ on your computer.
101-
101+
102102
> [!NOTE]
103103
> If you don't see your source code file, *`hello.cpp`*, make sure the current working directory in your command prompt is the *`C:\hello`* directory you created. Also make sure that this is the directory where you saved your source file. And make sure that you saved the source code with a *`.cpp`* file name extension, not a *`.txt`* extension. Your source file gets saved in the current directory as a *`.cpp`* file automatically if you open Notepad at the command prompt by using the **`notepad hello.cpp`** command. Notepad's behavior is different if you open it another way: By default, Notepad appends a *`.txt`* extension to new files when you save them. It also defaults to saving files in your *Documents* directory. To save your file with a *`.cpp`* extension in Notepad, choose **File** > **Save As**. In the **Save As** dialog, navigate to your *`C:\hello`* folder in the directory tree view control. Then use the **Save as type** dropdown control to select **All Files (\*.\*)**. Enter *`hello.cpp`* in the **File name** edit control, and then choose **Save** to save the file.
104104

docs/build/walkthrough-header-units.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ In this example, you'll compile a header file as a header unit. Start by creatin
5050

5151
1. Create a new C++ console app project.
5252
1. Replace the source file content as follows:
53+
5354
```cpp
5455
#include "Pythagorean.h"
5556

@@ -59,7 +60,9 @@ In this example, you'll compile a header file as a header unit. Start by creatin
5960
return 0;
6061
}
6162
```
63+
6264
1. Add a header file called `Pythagorean.h`, and replace its content with this code:
65+
6366
```cpp
6467
#ifndef PYTHAGOREAN
6568
#define PYTHAGOREAN
@@ -110,4 +113,4 @@ If you want to convert only a few header files to header units, this approach is
110113
[Overview of modules in C++](../cpp/modules-cpp.md) \
111114
[`/translateInclude`](./reference/translateinclude.md) \
112115
[`/exportHeader`](./reference/module-exportheader.md) \
113-
[`/headerUnit`](./reference/headerunit.md)
116+
[`/headerUnit`](./reference/headerunit.md)

docs/build/walkthrough-import-stl-header-units.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ This step creates a project that includes two libraries: `<iostream>` and `<vect
6363

6464
1. With Visual Studio, create a new C++ console app project.
6565
1. Modify the source file as follows:
66+
6667
```cpp
6768
import <iostream>;
6869
import <vector>;
@@ -73,7 +74,7 @@ This step creates a project that includes two libraries: `<iostream>` and `<vect
7374
std::cout << numbers[1];
7475
}
7576
```
76-
77+
7778
### Set project options and run the project
7879

7980
Follow these steps to set the options that cause the build system to scan for imported headers that can be compiled into header units.
@@ -103,7 +104,7 @@ The more flexible way to consume STL headers is to create one or more static lib
103104

104105
This option ensures that header units for a particular header will be built only once. It's similar to using a shared precompiled header file, but it's much easier.
105106

106-
In this example, you'll create a project that imports `<iostream>` and `<vector>`. After the solution is built, you'll reference this shared header unit project from another C++ project. Everywhere `import <iostream>;` or `import <vector>;` is found in the referencing project, the project will import the built header unit for that library instead of running the contents of the library header through the preprocessor.
107+
In this example, you'll create a project that imports `<iostream>` and `<vector>`. After the solution is built, you'll reference this shared header unit project from another C++ project. Everywhere `import <iostream>;` or `import <vector>;` is found in the referencing project, the project will import the built header unit for that library instead of running the contents of the library header through the preprocessor.
107108

108109
In projects that include the same library header in multiple files, this change will improve build performance similarly to how PCH files do. The header won't have to be processed over and over by the files that include it. Instead, the already processed compiled header unit will be imported.
109110

@@ -157,6 +158,7 @@ Next, create a project that will use the built `<vector>` and `<iostream>` share
157158
```
158159
159160
Change the **C++ Language Standard** for the compiler. To use header units, you need the [`/std:c++latest`](./reference/std-specify-language-standard-version.md) switch.
161+
160162
1. In **Solution Explorer**, right-click the **Walkthrough** project and select **Properties**. The project property pages open:
161163
:::image type="content" source="media/set-cpp-language-latest.png" alt-text="Screenshot that shows setting the language standard to the preview version.":::
162164
1. In the left pane of the **Walkthrough** project property pages, select **Configuration Properties** > **General**.
@@ -165,7 +167,7 @@ Change the **C++ Language Standard** for the compiler. To use header units, you
165167
166168
In the **Walkthrough** project, add a reference to the **SharedPrj** project.
167169
168-
1. In the **Walkthrough** project, select the **References** node, and then select **Add Reference**. Select **SharedPrj** in the list of projects:
170+
1. In the **Walkthrough** project, select the **References** node, and then select **Add Reference**. Select **SharedPrj** in the list of projects:
169171
:::image type="content" source="./media/add-reference-to-walkthrough.png" alt-text="Screenshot that shows the Add Reference dialog. It's used to add a reference to the Walkthrough project.":::
170172
Now that you've added this reference, the build system will use the header units built by **SharedPrj** whenever an `import` in the **Walkthrough** project matches one of the built header units in **SharedPrj**.
171173
1. Select **OK** to close the **Add Reference** dialog.
@@ -192,6 +194,7 @@ For example, if you have `#include <vector>` in your project and you reference a
192194
## Reuse header units among projects
193195
194196
Header units built by a static library project are automatically available to all directly and indirectly referencing projects. There are project settings that allow you to select which header units should be automatically available to all referencing projects. The settings are in project settings under **VC++ Directories**.
197+
195198
1. In **Solution Explorer**, right-click the project and select **Properties**.
196199
1. In the left pane of the project properties page, select **VC++ Directories**:
197200
:::image type="content" source="media/public-include-module-directories-setting.png" alt-text="Screenshot that shows public project content properties, like Public Include Directories and All Header Files are Public.":::
@@ -209,18 +212,20 @@ Typically, the easiest way to reuse header units among solutions is to reference
209212
But if you need to use a built header unit that you don't have the project for, you can specify where the built *`.ifc`* file is so you can import it in your solution.
210213
211214
To access this setting:
215+
212216
1. On the main menu, select **Project** > **Properties**. The project properties page opens.
213217
1. In the left pane of the project properties page, select **C/C++** > **General**.
214218
1. In the **Additional Module Dependencies** list, add the modules to reference. Here's an example of the format to use for **Additional Module Dependencies**: `ModuleName1=Path\To\ModuleName1.ifc; ModuleName2=Path\To\ModuleName2.ifc`
215219
:::image type="content" source="media/vs2019-additional-module-dependencies.png" alt-text="Screenshot showing project properties under C/C++, General, which Additional Module Dependencies selected.":::
216220
217221
## Select among multiple copies of a header unit
218-
222+
219223
If you reference two or more projects that built two or more header units with the same name, or that built two or more header units for the same header file, there will be multiple header units to choose from for the same import. You might have different versions of the header unit that were built with different compiler settings, for example, and need to inform the compiler which one to use.
220224
221225
Use the project properties **C/C++** > **Additional Header Unit Dependencies** setting to resolve collisions by specifying which header unit should be used. Otherwise, you can't predict which one will be picked.
222226
223227
To access this setting:
228+
224229
1. On the main menu, select **Project** > **Properties**. The project properties page opens.
225230
1. In the left pane of the project properties page, select **C/C++** > **General**.
226231
1. Use **Additional Header Unit Dependencies** to resolve collisions by specifying which module or header unit should be used for the project. Use this format for **Additional Header Unit Dependencies**: `Path\To\Header1.h= Path\To\HeaderUnit1.ifc;Path\To\Header2.h= Path\To\ HeaderUnit2.ifc`

docs/c-language/alignment-c.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,4 @@ Windows SDK 10.0.20348.0 (version 2104) or later. See [Windows 10 SDK](https://d
131131

132132
[`/std` (Specify Language Standard Version)](../build/reference/std-specify-language-standard-version.md)\
133133
[C++ `alignof` and `alignas`](../cpp/alignment-cpp-declarations.md#alignof-and-alignas)\
134-
[Compiler handling of data alignment](../cpp/alignment-cpp-declarations.md#compiler-handling-of-data-alignment)
134+
[Compiler handling of data alignment](../cpp/alignment-cpp-declarations.md#compiler-handling-of-data-alignment)

docs/c-language/expanding-wildcard-arguments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Wildcard argument expansion is Microsoft-specific.
1010

1111
When you run a C program, you can use either of the two wildcards, the question mark (**`?`**) and the asterisk (**`*`**), to specify filename and path arguments on the command line.
1212

13-
By default, wildcards aren't expanded in command-line arguments. You can replace the normal argument vector `argv` loading routine with a version that does expand wildcards by linking with the *`setargv.obj`* or *`wsetargv.obj`* file. If your program uses a `main` function, link with *`setargv.obj`*. If your program uses a `wmain` function, link with *`wsetargv.obj`*. Both of these have equivalent behavior.
13+
By default, wildcards aren't expanded in command-line arguments. You can replace the normal argument vector `argv` loading routine with a version that does expand wildcards by linking with the *`setargv.obj`* or *`wsetargv.obj`* file. If your program uses a `main` function, link with *`setargv.obj`*. If your program uses a `wmain` function, link with *`wsetargv.obj`*. Both of these have equivalent behavior.
1414

1515
To link with *`setargv.obj`* or *`wsetargv.obj`*, use the **`/link`** option. For example:
1616

docs/c-language/generic-selection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ Windows SDK 10.0.20348.0 (version 2104) or later. See [Windows 10 SDK](https://d
7979
## See also
8080

8181
[`/std` (Specify language standard version)](../build/reference/std-specify-language-standard-version.md)\
82-
[Type-generic math](../c-runtime-library/tgmath.md)
82+
[Type-generic math](../c-runtime-library/tgmath.md)

docs/c-language/noreturn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The primary benefits for using `_Noreturn` (or the equivalent `noreturn`) are ma
1616

1717
A function marked `noreturn` shouldn't include a return type because it doesn't return a value to the caller. It should be `void`.
1818

19-
## Example using `noreturn` macro and `_Noreturn `keyword
19+
## Example using `noreturn` macro and `_Noreturn` keyword
2020

2121
The following example demonstrates the `_Noreturn` keyword and the equivalent `noreturn` macro.
2222

docs/c-language/type-qualifiers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ If the specification of an array type includes type qualifiers, the element is q
5353
If **`volatile`** is used alone, **`int`** is assumed. The **`volatile`** type specifier can be used to provide reliable access to special memory locations. Use **`volatile`** with data objects that may be accessed or altered by signal handlers, by concurrently executing programs, or by special hardware such as memory-mapped I/O control registers. You can declare a variable as **`volatile`** for its lifetime, or you can cast a single reference to be **`volatile`**.
5454
5555
- An item can be both **`const`** and **`volatile`**, in which case the item couldn't be legitimately modified by its own program, but could be modified by some asynchronous process.
56-
56+
5757
## `restrict`
5858
5959
The **`restrict`** type qualifier, introduced in C99 and available in [`/std:c11` or `/std:c17`](../build/reference/std-specify-language-standard-version.md) mode, can be applied to pointer declarations. It qualifies the pointer, not what it points at.

docs/c-runtime-library/country-region-strings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ helpviewer_keywords: ["country/region strings"]
66
---
77
# Country/Region Strings
88

9-
Country and region strings can be combined with a language string to create a locale specification for the `setlocale`, `_wsetlocale`, `_create_locale`, and `_wcreate_locale` functions.
9+
Country and region strings can be combined with a language string to create a locale specification for the `setlocale`, `_wsetlocale`, `_create_locale`, and `_wcreate_locale` functions.
1010

1111
For lists of country and region names that are supported by various Windows operating system versions, see the **Language**, **Location**, and **Language tag** columns of the table in [Appendix A: Product Behavior](/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c) in \[MS-LCID]: Windows Language Code Identifier (LCID) Reference. For an example of code that enumerates available locale names and related values, see [NLS: Name-based APIs Sample](/windows/win32/intl/nls--name-based-apis-sample).
1212

docs/c-runtime-library/crt-library-features.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,5 +102,5 @@ Be careful if your program passes certain CRT resources across DLL boundaries. R
102102

103103
## See also
104104

105-
- [C runtime library reference](../c-runtime-library/c-run-time-library-reference.md)
106-
- [Redistributing Visual C++ Files](../windows/redistributing-visual-cpp-files.md)
105+
[C runtime library reference](../c-runtime-library/c-run-time-library-reference.md)\
106+
[Redistributing Visual C++ Files](../windows/redistributing-visual-cpp-files.md)

0 commit comments

Comments
 (0)