Skip to content

Commit f6213ba

Browse files
author
Colin Robertson
committed
Merge branch 'master' into cr-1850-2
2 parents c8c91cb + 00480a9 commit f6213ba

4 files changed

Lines changed: 33 additions & 28 deletions

File tree

docs/build/reference/zc-inline-remove-unreferenced-comdat.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ ms.assetid: a4c94224-1d73-4bea-a9d5-4fa73dc924df
77
---
88
# /Zc:inline (Remove unreferenced COMDAT)
99

10-
Removes unreferenced functions or data that are COMDATs or only have internal linkage. When **/Zc:inline** is specified, the compiler requires that translation units that use inline data or inline functions must also include the definitions for the data or functions.
10+
Removes unreferenced data or functions that are COMDATs, or that only have internal linkage. Under **/Zc:inline**, the compiler specifies that translation units with inline data or functions must also include their definitions.
1111

1212
## Syntax
1313

1414
> **/Zc:inline**[**-**]
1515
1616
## Remarks
1717

18-
When **/Zc:inline** is specified, the compiler does not emit symbol information for unreferenced COMDAT functions or data, or for functions or data that have internal linkage only. This optimization simplifies some of the work performed by the linker in release builds or when the linker option [/OPT:REF](opt-optimizations.md) is specified. When the compiler performs this optimization, it can significantly reduce .obj file size and improve linker speeds. This compiler option is not enabled when optimizations are disabled ([/Od](od-disable-debug.md)) or when [/GL (Whole Program Optimization)](gl-whole-program-optimization.md) is specified.
18+
When **/Zc:inline** is specified, the compiler doesn't emit symbol information for unreferenced COMDAT functions or data. Or, for data or functions that have internal linkage only. This optimization simplifies some of the work the linker does in release builds, or when you specify the [/OPT:REF](opt-optimizations.md) linker option. This compiler optimization can significantly reduce .obj file size and improve linker speeds. The compiler option isn't enabled when you disable optimizations ([/Od](od-disable-debug.md)). Or, when you specify [/GL (Whole Program Optimization)](gl-whole-program-optimization.md).
1919

20-
By default, this option is off (**/Zc:inline-**) in command-line builds. The [/permissive-](permissive-standards-conformance.md) option does not enable **/Zc:inline**. In MSBuild projects, the option is set by the **Configuration Properties** > **C/C++** > **Language** > **Remove unreferenced code and data** property, which is set to **Yes** by default.
20+
By default, this option is off (**/Zc:inline-**) in command-line builds. The [/permissive-](permissive-standards-conformance.md) option doesn't enable **/Zc:inline**. In MSBuild projects, the option is set by the **Configuration Properties** > **C/C++** > **Language** > **Remove unreferenced code and data** property, which is set to **Yes** by default.
2121

2222
If **/Zc:inline** is specified, the compiler enforces the C++11 requirement that all functions declared `inline` must have a definition available in the same translation unit if they are used. When the option is not specified, the Microsoft compiler allows non-conformant code that invokes functions declared `inline` even if no definition is visible. For more information, see the C++11 standard, in section 3.2 and section 7.1.2. This compiler option was introduced in Visual Studio 2013 Update 2.
2323

docs/build/reference/zc-referencebinding-enforce-reference-binding-rules.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ ms.assetid: 0c6cfaac-9c2a-41a3-aa94-64ca8ef261fc
77
---
88
# /Zc:referenceBinding (Enforce reference binding rules)
99

10-
When the **/Zc:referenceBinding** option is specified, the compiler does not allow a non-const lvalue reference to bind to a temporary.
10+
When the **/Zc:referenceBinding** option is specified, the compiler doesn't allow a non-const lvalue reference to bind to a temporary.
1111

1212
## Syntax
1313

1414
> **/Zc:referenceBinding**[**-**]
1515
1616
## Remarks
1717

18-
If **/Zc:referenceBinding** is specified, the compiler follows section 8.5.3 of the C++11 standard and does not allow expressions that bind a user-defined type temporary to a non-const lvalue reference. By default, or if **/Zc:referenceBinding-** is specified, the compiler allows such expressions as a Microsoft extension, but a level 4 warning is issued. For code security, portability and conformance, we recommend that you use **/Zc:referenceBinding**.
18+
If **/Zc:referenceBinding** is specified, the compiler follows section 8.5.3 of the C++11 standard: It doesn't allow expressions that bind a user-defined type temporary to a non-const lvalue reference. By default, or if **/Zc:referenceBinding-** is specified, the compiler allows such expressions as a Microsoft extension, but a level 4 warning is issued. For code security, portability and conformance, we recommend you use **/Zc:referenceBinding**.
1919

2020
The **/Zc:referenceBinding** option is off by default. The [/permissive-](permissive-standards-conformance.md) compiler option implicitly sets this option, but it can be overridden by using **/Zc:referenceBinding-**.
2121

docs/cpp/this-pointer.md

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
---
2-
title: "this Pointer"
3-
ms.date: "11/04/2016"
2+
title: "this pointer"
3+
description: "The this pointer is a compiler-generated pointer to the current object in nonstatic member functions."
4+
ms.date: "01/22/2020"
45
f1_keywords: ["this_cpp"]
56
helpviewer_keywords: ["nonstatic member functions [C++]", "pointers, to class instance", "this pointer"]
67
ms.assetid: 92e3256a-4ad9-4d46-8be1-d77fad90791f
8+
no-loc: [this, class, struct, union, sizeof, const, volatile]
79
---
8-
# this Pointer
10+
# this pointer
911

10-
The **this** pointer is a pointer accessible only within the nonstatic member functions of a **class**, **struct**, or **union** type. It points to the object for which the member function is called. Static member functions do not have a **this** pointer.
12+
The **this** pointer is a pointer accessible only within the nonstatic member functions of a **class**, **struct**, or **union** type. It points to the object for which the member function is called. Static member functions don't have a **this** pointer.
1113

1214
## Syntax
1315

@@ -18,19 +20,19 @@ this->member-identifier
1820

1921
## Remarks
2022

21-
An object's **this** pointer is not part of the object itself; it is not reflected in the result of a **sizeof** statement on the object. Instead, when a nonstatic member function is called for an object, the address of the object is passed by the compiler as a hidden argument to the function. For example, the following function call:
23+
An object's **this** pointer isn't part of the object itself. It's not reflected in the result of a **sizeof** statement on the object. When a nonstatic member function is called for an object, the compiler passes the object's address to the function as a hidden argument. For example, the following function call:
2224

2325
```cpp
2426
myDate.setMonth( 3 );
2527
```
2628

27-
can be interpreted this way:
29+
can be interpreted as:
2830

2931
```cpp
3032
setMonth( &myDate, 3 );
3133
```
3234
33-
The object's address is available from within the member function as the **this** pointer. Most uses of **this** are implicit. It is legal, though unnecessary, to explicitly use **this** when referring to members of the class. For example:
35+
The object's address is available from within the member function as the **this** pointer. Most **this** pointer uses are implicit. It's legal, though unnecessary, to use an explicit **this** when referring to members of the class. For example:
3436
3537
```cpp
3638
void Date::setMonth( int mn )
@@ -55,7 +57,7 @@ if (&Object != this) {
5557
```
5658
5759
> [!NOTE]
58-
> Because the **this** pointer is nonmodifiable, assignments to **this** are not allowed. Earlier implementations of C++ allowed assignments to **this**.
60+
> Because the **this** pointer is nonmodifiable, assignments to the **this** pointer are not allowed. Earlier implementations of C++ allowed assignment to **this**.
5961
6062
Occasionally, the **this** pointer is used directly — for example, to manipulate self-referential data structures, where the address of the current object is required.
6163
@@ -131,9 +133,9 @@ your buffer
131133

132134
## Type of the this pointer
133135

134-
The **this** pointer's type can be modified in the function declaration by the **const** and **volatile** keywords. To declare a function as having the attributes of one or more of these keywords, add the keyword(s) after the function argument list.
136+
The **this** pointer's type can be modified in the function declaration by the **const** and **volatile** keywords. To declare a function that has either of these attributes, add the keyword(s) after the function argument list.
135137

136-
Consider this example:
138+
Consider an example:
137139

138140
```cpp
139141
// type_of_this_pointer1.cpp
@@ -146,7 +148,7 @@ int main()
146148
}
147149
```
148150

149-
The preceding code declares a member function, `X`, in which the **this** pointer is treated as a **const** pointer to a **const** object. Combinations of *cv-mod-list* options can be used, but they always modify the object pointed to by **this**, not the **this** pointer itself. Therefore, the following declaration declares function `X`; the **this** pointer is a **const** pointer to a **const** object:
151+
The preceding code declares a member function, `X`, in which the **this** pointer is treated as a **const** pointer to a **const** object. Combinations of *cv-mod-list* options can be used, but they always modify the object pointed to by the **this** pointer, not the pointer itself. The following declaration declares function `X`, where the **this** pointer is a **const** pointer to a **const** object:
150152

151153
```cpp
152154
// type_of_this_pointer2.cpp
@@ -159,28 +161,30 @@ int main()
159161
}
160162
```
161163

162-
The type of **this** in a member function is described by the following syntax, where *cv-qualifier-list* is determined from the member functions declarator and can be **const** or **volatile** (or both), and *class-type* is the name of the class:
164+
The type of **this** in a member function is described by the following syntax. The *cv-qualifier-list* is determined from the member function's declarator. It can be **const** or **volatile** (or both). *class-type* is the name of the class:
163165

164-
*[cv-qualifier-list] class-type* *** const this**
166+
[*cv-qualifier-list*] *class-type* **\* const this**
165167

166-
In other words, **this** is always a const pointer; it cannot be reassigned. The **const** or **volatile** qualifiers used in the member function declaration apply to the class instance pointed to by **this** in the scope of that function.
168+
In other words, the **this** pointer is always a const pointer. It can't be reassigned. The **const** or **volatile** qualifiers used in the member function declaration apply to the class instance the **this** pointer points at, in the scope of that function.
167169

168170
The following table explains more about how these modifiers work.
169171

170-
### Semantics of this Modifiers
172+
### Semantics of this modifiers
171173

172174
|Modifier|Meaning|
173175
|--------------|-------------|
174-
|**const**|Cannot change member data; cannot invoke member functions that are not **const**.|
175-
|**volatile**|Member data is loaded from memory each time it is accessed; disables certain optimizations.|
176+
|**const**|Can't change member data; can't invoke member functions that aren't **const**.|
177+
|**volatile**|Member data is loaded from memory each time it's accessed; disables certain optimizations.|
176178

177-
It is an error to pass a **const** object to a member function that is not **const**. Similarly, it is an error to pass a **volatile** object to a member function that is not **volatile**.
179+
It's an error to pass a **const** object to a member function that isn't **const**.
178180

179-
Member functions declared as **const** cannot change member data — in such functions, the **this** pointer is a pointer to a **const** object.
181+
Similarly, it's also an error to pass a **volatile** object to a member function that isn't **volatile**.
182+
183+
Member functions declared as **const** can't change member data — in such functions, the **this** pointer is a pointer to a **const** object.
180184

181185
> [!NOTE]
182-
> Constructors and destructors cannot be declared as **const** or **volatile**. They can, however, be invoked on **const** or **volatile** objects.
186+
> Constructors and destructors can't be declared as **const** or **volatile**. They can, however, be invoked on **const** or **volatile** objects.
183187
184188
## See also
185189

186-
[Keywords](../cpp/keywords-cpp.md)
190+
[Keywords](../cpp/keywords-cpp.md)

docs/mfc/reference/clistbox-class.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: "CListBox Class"
3-
ms.date: "11/04/2016"
3+
description: "A description of the MFC CListBox class and its member functions."
4+
ms.date: "01/22/2020"
45
f1_keywords: ["CListBox", "AFXWIN/CListBox", "AFXWIN/CListBox::CListBox", "AFXWIN/CListBox::AddString", "AFXWIN/CListBox::CharToItem", "AFXWIN/CListBox::CompareItem", "AFXWIN/CListBox::Create", "AFXWIN/CListBox::DeleteItem", "AFXWIN/CListBox::DeleteString", "AFXWIN/CListBox::Dir", "AFXWIN/CListBox::DrawItem", "AFXWIN/CListBox::FindString", "AFXWIN/CListBox::FindStringExact", "AFXWIN/CListBox::GetAnchorIndex", "AFXWIN/CListBox::GetCaretIndex", "AFXWIN/CListBox::GetCount", "AFXWIN/CListBox::GetCurSel", "AFXWIN/CListBox::GetHorizontalExtent", "AFXWIN/CListBox::GetItemData", "AFXWIN/CListBox::GetItemDataPtr", "AFXWIN/CListBox::GetItemHeight", "AFXWIN/CListBox::GetItemRect", "AFXWIN/CListBox::GetListBoxInfo", "AFXWIN/CListBox::GetLocale", "AFXWIN/CListBox::GetSel", "AFXWIN/CListBox::GetSelCount", "AFXWIN/CListBox::GetSelItems", "AFXWIN/CListBox::GetText", "AFXWIN/CListBox::GetTextLen", "AFXWIN/CListBox::GetTopIndex", "AFXWIN/CListBox::InitStorage", "AFXWIN/CListBox::InsertString", "AFXWIN/CListBox::ItemFromPoint", "AFXWIN/CListBox::MeasureItem", "AFXWIN/CListBox::ResetContent", "AFXWIN/CListBox::SelectString", "AFXWIN/CListBox::SelItemRange", "AFXWIN/CListBox::SetAnchorIndex", "AFXWIN/CListBox::SetCaretIndex", "AFXWIN/CListBox::SetColumnWidth", "AFXWIN/CListBox::SetCurSel", "AFXWIN/CListBox::SetHorizontalExtent", "AFXWIN/CListBox::SetItemData", "AFXWIN/CListBox::SetItemDataPtr", "AFXWIN/CListBox::SetItemHeight", "AFXWIN/CListBox::SetLocale", "AFXWIN/CListBox::SetSel", "AFXWIN/CListBox::SetTabStops", "AFXWIN/CListBox::SetTopIndex", "AFXWIN/CListBox::VKeyToItem"]
56
helpviewer_keywords: ["CListBox [MFC], CListBox", "CListBox [MFC], AddString", "CListBox [MFC], CharToItem", "CListBox [MFC], CompareItem", "CListBox [MFC], Create", "CListBox [MFC], DeleteItem", "CListBox [MFC], DeleteString", "CListBox [MFC], Dir", "CListBox [MFC], DrawItem", "CListBox [MFC], FindString", "CListBox [MFC], FindStringExact", "CListBox [MFC], GetAnchorIndex", "CListBox [MFC], GetCaretIndex", "CListBox [MFC], GetCount", "CListBox [MFC], GetCurSel", "CListBox [MFC], GetHorizontalExtent", "CListBox [MFC], GetItemData", "CListBox [MFC], GetItemDataPtr", "CListBox [MFC], GetItemHeight", "CListBox [MFC], GetItemRect", "CListBox [MFC], GetListBoxInfo", "CListBox [MFC], GetLocale", "CListBox [MFC], GetSel", "CListBox [MFC], GetSelCount", "CListBox [MFC], GetSelItems", "CListBox [MFC], GetText", "CListBox [MFC], GetTextLen", "CListBox [MFC], GetTopIndex", "CListBox [MFC], InitStorage", "CListBox [MFC], InsertString", "CListBox [MFC], ItemFromPoint", "CListBox [MFC], MeasureItem", "CListBox [MFC], ResetContent", "CListBox [MFC], SelectString", "CListBox [MFC], SelItemRange", "CListBox [MFC], SetAnchorIndex", "CListBox [MFC], SetCaretIndex", "CListBox [MFC], SetColumnWidth", "CListBox [MFC], SetCurSel", "CListBox [MFC], SetHorizontalExtent", "CListBox [MFC], SetItemData", "CListBox [MFC], SetItemDataPtr", "CListBox [MFC], SetItemHeight", "CListBox [MFC], SetLocale", "CListBox [MFC], SetSel", "CListBox [MFC], SetTabStops", "CListBox [MFC], SetTopIndex", "CListBox [MFC], VKeyToItem"]
67
ms.assetid: 7ba3c699-c286-4cd9-9066-532c41ec05d1
@@ -939,7 +940,7 @@ UINT ItemFromPoint(
939940
Point for which to find the nearest item, specified relative to the upper-left corner of the client area of the list box.
940941

941942
*bOutside*<br/>
942-
Reference to a BOOL variable which will be set to TRUE if *pt* is outside the client area of the nearest list box item, FALSE if *pt* is inside the client area of the nearest list box item.
943+
Reference to a BOOL variable which will be set to TRUE if *pt* is outside the client area of the list box, FALSE if *pt* is inside the client area of the list box.
943944

944945
### Return Value
945946

0 commit comments

Comments
 (0)