Skip to content

Commit b8aa616

Browse files
author
Colin Robertson
authored
Merge pull request MicrosoftDocs#883 from MicrosoftDocs/master636892188609770135
Fix git push error for protected CLA branch
2 parents 02ed3ee + 7412df6 commit b8aa616

9 files changed

+72
-70
lines changed

docs/build/arm-exception-handling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ ULONG ComputeXdataSize(PULONG *Xdata)
214214
}
215215
```
216216
217-
Athough the prologue and each epilogue has an index into the unwind codes, the table is shared between them. It is not uncommon that they can all share the same unwind codes. We recommend that compiler writers optimize for this case, because the largest index that can be specified is 255, and that limits the total number of unwind codes possible for a particular function.
217+
Although the prologue and each epilogue has an index into the unwind codes, the table is shared between them. It is not uncommon that they can all share the same unwind codes. We recommend that compiler writers optimize for this case, because the largest index that can be specified is 255, and that limits the total number of unwind codes possible for a particular function.
218218
219219
### Unwind Codes
220220

docs/build/reference/link-pass-options-to-linker.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "/link (Pass Options to Linker)"
3-
ms.date: "11/04/2016"
3+
ms.date: "03/25/2019"
44
f1_keywords: ["/link"]
55
helpviewer_keywords: ["/link compiler option [C++]", "pass options to linker", "link compiler option [C++]", "linker [C++], passing options to", "-link compiler option [C++]", "cl.exe compiler [C++], passing options to linker"]
66
ms.assetid: 16902a94-c094-4328-841f-3ac94ca04848
@@ -11,32 +11,36 @@ Passes one or more linker options to the linker.
1111

1212
## Syntax
1313

14-
```
15-
/link linkeroptions
16-
```
14+
> **/link** *linker-options*
1715
1816
## Arguments
1917

20-
*linkeroptions*<br/>
18+
*linker-options*<br/>
2119
The linker option or options to be passed to the linker.
2220

2321
## Remarks
2422

2523
The **/link** option and its linker options must appear after any file names and CL options. A space is required between **/link** and `linkeroptions`. For more information, see [MSVC linker reference](linking.md).
2624

25+
## Example
26+
27+
This sample command line compiles *hello.cpp* and links it to the existing object file *there.obj*. It then passes an additional **/VERSION** command to the linker:
28+
29+
`cl /W4 /EHsc hello.cpp there.obj /link /VERSION:3.14`
30+
2731
### To set this compiler option in the Visual Studio development environment
2832

29-
1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
33+
The IDE normally sends separate commands to compile and link your code. You can set linker options in your project property pages.
3034

31-
1. Click the **Linker** folder.
35+
1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
3236

33-
1. Click a linker property page.
37+
1. Select the **Configuration Properties** > **Linker** folder.
3438

35-
1. Modify one or more properties.
39+
1. Modify one or more properties. Choose **OK** to save your changes.
3640

3741
### To set this compiler option programmatically
3842

39-
- This compiler option cannot be changed programmatically.
43+
- This compiler option can't be changed programmatically.
4044

4145
## See also
4246

docs/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,12 @@ Next, to call the MathLibrary functions in your source code, your project must i
288288

289289
1. Double-click in the top pane of the **Additional Include Directories** dialog box to enable an edit control.
290290

291-
1. In the edit control, specify the path to the location of the **MathLibrary.h** header file. In this case, you can use a relative path:
291+
1. In the edit control, specify the path to the location of the **MathLibrary.h** header file. In this case, you can use a relative path from the folder that contains your .cpp files in the client project to the folder that contains the .h file in the DLL project. If your client project is in a separate solution in the same folder as the DLL solution, the relative path should look like this:
292292

293293
`..\..\MathLibrary\MathLibrary`
294294

295+
If your DLL and client projects are in the same solution, or the solutions are in different folders, then you must adjust the relative path accordingly.
296+
295297
![Add the header location to the Additional Include Directories property](media/mathclient-additional-include-directories.png "Add the header location to the Additional Include Directories property")
296298

297299
1. Once you've entered the path to the header file in the **Additional Include Directories** dialog box, choose the **OK** button to go back to the **Property Pages** dialog box, and then choose the **OK** button to save your changes.

docs/c-runtime-library/reference/strtok-s-strtok-s-l-wcstok-s-wcstok-s-l-mbstok-s-mbstok-s-l.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "strtok_s, _strtok_s_l, wcstok_s, _wcstok_s_l, _mbstok_s, _mbstok_s_l"
3-
ms.date: "11/04/2016"
3+
ms.date: "03/25/2019"
44
apiname: ["_wcstok_s_l", "_mbstok_s_l", "_mbstok_s", "strtok_s", "wcstok_s", "_strtok_s_l"]
55
apilocation: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-multibyte-l1-1-0.dll", "api-ms-win-crt-string-l1-1-0.dll", "ntoskrnl.exe"]
66
apitype: "DLLExport"
@@ -84,19 +84,21 @@ Returns a pointer to the next token found in *str*. Returns **NULL** when no mor
8484
|any|**NULL**|any|**NULL**|**EINVAL**|
8585
|any|any|**NULL**|**NULL**|**EINVAL**|
8686

87-
If *str* is **NULL** but *context* is a pointer to a valid context pointer, there is no error.
87+
If *str* is **NULL** but *context* is a pointer to a valid context pointer, there's no error.
8888

8989
## Remarks
9090

9191
The **strtok_s** family of functions finds the next token in *str*. The set of characters in *delimiters* specifies possible delimiters of the token to be found in *str* on the current call. **wcstok_s** and **_mbstok_s** are wide-character and multibyte-character versions of **strtok_s**. The arguments and return values of **wcstok_s** and **_wcstok_s_l** are wide-character strings; those of **_mbstok_s** and **_mbstok_s_l** are multibyte-character strings. These functions behave identically otherwise.
9292

93-
This function validates its parameters. If an error condition occurs, as in the Error Conditions table, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions set **errno** to **EINVAL** and return **NULL**.
93+
This function validates its parameters. When an error condition occurs, as in the Error Conditions table, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions set **errno** to **EINVAL** and return **NULL**.
9494

95-
On the first call to **strtok_s** the function skips leading delimiters and returns a pointer to the first token in *str*, terminating the token with a null character. More tokens can be broken out of the remainder of *str* by a series of calls to **strtok_s**. Each call to **strtok_s** modifies *str* by inserting a null character after the token returned by that call. The *context* pointer keeps track of which string is being read and where in the string the next token is to be read. To read the next token from *str*, call **strtok_s** with a **NULL** value for the *str* argument, and pass the same *context* parameter. The **NULL** *str* argument causes **strtok_s** to search for the next token in the modified *str*. The *delimiters* argument can take any value from one call to the next so that the set of delimiters may vary.
95+
On the first call to **strtok_s**, the function skips leading delimiters and returns a pointer to the first token in *str*, terminating the token with a null character. More tokens can be broken out of the remainder of *str* by a series of calls to **strtok_s**. Each call to **strtok_s** modifies *str* by inserting a null character after the token returned by that call. The *context* pointer keeps track of which string is being read and where in the string the next token is to be read. To read the next token from *str*, call **strtok_s** with a **NULL** value for the *str* argument, and pass the same *context* parameter. The **NULL** *str* argument causes **strtok_s** to search for the next token in the modified *str*. The *delimiters* argument can take any value from one call to the next so that the set of delimiters may vary.
9696

97-
Since the *context* parameter supersedes the static buffers used in **strtok** and **_strtok_l**, it is possible to parse two strings simultaneously in the same thread.
97+
Since the *context* parameter supersedes the static buffers used in **strtok** and **_strtok_l**, it's possible to parse two strings simultaneously in the same thread.
9898

99-
The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale](setlocale-wsetlocale.md) for more information. The versions of these functions without the **_l** suffix use the current thread locale for this locale-dependent behavior. The versions with the **_l** suffix are identical except that they instead use the *locale* parameter. For more information, see [Locale](../../c-runtime-library/locale.md).
99+
The output value is affected by the setting of the **LC_CTYPE** category setting of the locale. For more information, see [setlocale](setlocale-wsetlocale.md).
100+
101+
The versions of these functions without the **_l** suffix use the current thread locale for this locale-dependent behavior. The versions with the **_l** suffix are identical except they instead use the locale specified by the *locale* parameter. For more information, see [Locale](../../c-runtime-library/locale.md).
100102

101103
## Requirements
102104

docs/c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "strtok, _strtok_l, wcstok, _wcstok_l, _mbstok, _mbstok_l"
3-
ms.date: "11/04/2016"
3+
ms.date: "03/25/2019"
44
apiname: ["_mbstok_l", "_mbstok", "wcstok", "_mbstok", "strtok", "_wcstok_l"]
55
apilocation: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-multibyte-l1-1-0.dll", "api-ms-win-crt-string-l1-1-0.dll"]
66
apitype: "DLLExport"
@@ -37,11 +37,11 @@ wchar_t *wcstok_l(
3737
_locale_t locale
3838
);
3939
unsigned char *_mbstok(
40-
unsigned char*strToken,
40+
unsigned char *strToken,
4141
const unsigned char *strDelimit
4242
);
4343
unsigned char *_mbstok_l(
44-
unsigned char*strToken,
44+
unsigned char *strToken,
4545
const unsigned char *strDelimit,
4646
_locale_t locale
4747
);
@@ -60,7 +60,7 @@ Locale to use.
6060

6161
## Return Value
6262

63-
Returns a pointer to the next token found in *strToken*. They return **NULL** when no more tokens are found. Each call modifies *strToken* by substituting a null character for the first delimiter that occurs after the returned token.
63+
Returns a pointer to the next token found in *strToken*. The functions return **NULL** when no more tokens are found. Each call modifies *strToken* by substituting a null character for the first delimiter that occurs after the returned token.
6464

6565
## Remarks
6666

@@ -71,7 +71,9 @@ The **strtok** function finds the next token in *strToken*. The set of character
7171
7272
On the first call to **strtok**, the function skips leading delimiters and returns a pointer to the first token in *strToken*, terminating the token with a null character. More tokens can be broken out of the remainder of *strToken* by a series of calls to **strtok**. Each call to **strtok** modifies *strToken* by inserting a null character after the **token** returned by that call. To read the next token from *strToken*, call **strtok** with a **NULL** value for the *strToken* argument. The **NULL** *strToken* argument causes **strtok** to search for the next token in the modified *strToken*. The *strDelimit* argument can take any value from one call to the next so that the set of delimiters may vary.
7373

74-
The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale](setlocale-wsetlocale.md) for more information. The versions of these functions without the **_l** suffix use the current locale for this locale-dependent behavior; the versions with the **_l** suffix are identical except that they use the locale parameter passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md).
74+
The output value is affected by the setting of the **LC_CTYPE** category setting of the locale. For more information, see [setlocale](setlocale-wsetlocale.md).
75+
76+
The versions of these functions without the **_l** suffix use the current locale for this locale-dependent behavior. The versions with the **_l** suffix are identical except that they use the locale parameter passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md).
7577

7678
> [!NOTE]
7779
> Each function uses a thread-local static variable for parsing the string into tokens. Therefore, multiple threads can simultaneously call these functions without undesirable effects. However, within a single thread, interleaving calls to one of these functions is highly likely to produce data corruption and inaccurate results. When parsing different strings, finish parsing one string before starting to parse the next. Also, be aware of the potential for danger when calling one of these functions from within a loop where another function is called. If the other function ends up using one of these functions, an interleaved sequence of calls will result, triggering data corruption.

docs/cpp/cpp-type-system-modern-cpp.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,7 @@ When you define a **class**, **struct**, **union**, or **enum**, that construct
9696

9797
- The compiler has no built-in knowledge of a user-defined type. It learns of the type when it first encounters the definition during the compilation process.
9898

99-
- You specify what operations can be performed on your type, and how it can be converted to other types, by defining (through overloading) the appropriate operators, either as class members or non-member functions. For more information, see [Function Overloading](function-overloading.md).
100-
101-
- They do not have to be statically typed (the rule that an object's type never changes). Through the mechanisms of *inheritance* and *polymorphism*, a variable declared as a user-defined type of class (referred to as an object instance of a class) might have a different type at run-time than at compile time. For more information, see [Inheritance](../cpp/inheritance-cpp.md).
99+
- You specify what operations can be performed on your type, and how it can be converted to other types, by defining (through overloading) the appropriate operators, either as class members or non-member functions. For more information, see [Function Overloading](function-overloading.md)
102100

103101
## Pointer types
104102

docs/cpp/lambda-expression-syntax.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Lambda Expression Syntax"
3-
ms.date: "11/04/2016"
3+
ms.date: "03/25/2019"
44
helpviewer_keywords: ["lambda expressions [C++], syntax"]
55
ms.assetid: 5d6154a4-f34d-4a15-970d-7e7de45f54e9
66
---
@@ -32,7 +32,7 @@ using namespace std;
3232

3333
int main()
3434
{
35-
// Create a vector object that contains 10 elements.
35+
// Create a vector object that contains 9 elements.
3636
vector<int> v;
3737
for (int i = 1; i < 10; ++i) {
3838
v.push_back(i);
@@ -57,8 +57,6 @@ int main()
5757
}
5858
```
5959

60-
### Output
61-
6260
```Output
6361
1 is odd
6462
2 is even
@@ -122,7 +120,7 @@ private:
122120

123121
int main()
124122
{
125-
// Create a vector object that contains 10 elements.
123+
// Create a vector object that contains 9 elements.
126124
vector<int> v;
127125
for (int i = 1; i < 10; ++i) {
128126
v.push_back(i);
@@ -139,8 +137,6 @@ int main()
139137
}
140138
```
141139

142-
## Output
143-
144140
```Output
145141
1 is odd
146142
2 is even

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4789.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Compiler Warning (Level 1) C4789"
3-
ms.date: "11/04/2016"
3+
ms.date: "03/25/2019"
44
f1_keywords: ["C4789"]
55
helpviewer_keywords: ["C4789"]
66
ms.assetid: 5800c301-5afb-4af0-85c1-ceb54d775234
@@ -11,28 +11,30 @@ ms.assetid: 5800c301-5afb-4af0-85c1-ceb54d775234
1111
1212
## Remarks
1313

14-
Warns about buffer overrun when specific C run-time (CRT) functions are used, parameters are passed, and assignments are performed, such that the data sizes are known at compile time. This warning is for situations that might elude typical data-size mismatch detection.
14+
**C4789** warns about buffer overruns when specific C run-time (CRT) functions are used. It can also report size mismatches when parameters are passed or assignments are made. The warning is possible if the data sizes are known at compile time. This warning is for situations that might elude typical data-size mismatch detection.
1515

16-
The warning appears when data, whose length is known at compile time, is copied and put into a data block whose size is known at compile time to be too small for the data. The copy must be done by using the intrinsic form of one of the following CRT functions:
16+
**C4789** warns when data is copied into a data block that's known to be too small at compile time.
17+
18+
The warning occurs if the copy uses the intrinsic form of one of these CRT functions:
1719

1820
- [strcpy](../../c-runtime-library/reference/strcpy-wcscpy-mbscpy.md)
1921

2022
- [memset](../../c-runtime-library/reference/memset-wmemset.md)
2123

2224
- [memcpy](../../c-runtime-library/reference/memcpy-wmemcpy.md), [wmemcpy](../../c-runtime-library/reference/memcpy-wmemcpy.md)
2325

24-
The warning also appears when a parameter datatype is mismatched by using a cast, and then a copy assignment from an lvalue reference is attempted.
26+
The warning also appears when you cast a parameter to a larger data type, and then make a copy assignment from an lvalue reference.
2527

26-
Visual C++ might generate this warning for a code path that does not ever execute. You can temporarily disable the warning by using `#pragma`, as shown in this example:
28+
Visual C++ might generate this warning for a code path that never executes. You can temporarily disable the warning by using `#pragma`, as shown in this example:
2729

2830
```cpp
29-
#pragma(push)
30-
#pragma warning ( disable : 4789 )
31+
#pragma warning( push )
32+
#pragma warning( disable : 4789 )
3133
// unused code that generates compiler warning C4789`
32-
#pragma(pop)
34+
#pragma warning( pop )
3335
```
3436

35-
This keeps Visual C++ from generating the warning for that specific block of code. The `#pragma(push)` preserves the existing state before `#pragma warning(disable: 4789)` changes it. The `#pragma(pop)` restores the pushed state, and removes the effects of the `#pragma warning(disable:4789)`. For more information about the C++ preprocessor directive `#pragma`, see [warning](../../preprocessor/warning.md) and [Pragma Directives and the __Pragma Keyword](../../preprocessor/pragma-directives-and-the-pragma-keyword.md).
37+
This idiom keeps Visual C++ from generating the warning for that specific block of code. The `#pragma warning(push)` preserves the existing state before `#pragma warning(disable: 4789)` changes it. The `#pragma warning(pop)` restores the pushed state, and removes the effects of the `#pragma warning(disable:4789)`. For more information about the C++ preprocessor directive `#pragma`, see [warning](../../preprocessor/warning.md) and [Pragma Directives and the __Pragma Keyword](../../preprocessor/pragma-directives-and-the-pragma-keyword.md).
3638

3739
## Example
3840

0 commit comments

Comments
 (0)