Skip to content

Commit 198191b

Browse files
author
Colin Robertson
authored
Merge pull request MicrosoftDocs#1638 from MicrosoftDocs/master637070173383613736
Fix git push error for protected CLA branch
2 parents cfa397b + 8178d22 commit 198191b

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

docs/cpp/constructors-cpp.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Constructors (C++)"
3-
ms.date: "09/05/2019"
3+
ms.date: "10/17/2019"
44
helpviewer_keywords: ["constructors [C++]", "objects [C++], creating", "instance constructors"]
55
ms.assetid: 3e9f7211-313a-4a92-9584-337452e061a9
66
---
@@ -197,13 +197,13 @@ Attempting to copy the object produces error *C2280: attempting to reference a d
197197
198198
## <a name="move_constructors"></a> Move constructors
199199
200-
A *move constructor* is a special member function that moves ownership of an existing object's data to a new variable without copying the original data. It takes an rvalue reference as its first parameter, and any additional parameters must have default values. Move constructors can significantly increase your program's efficiency when passing around large objects. A move constructor takes an rvalue reference as its first parameter. Any other parameters must have default values.
200+
A *move constructor* is a special member function that moves ownership of an existing object's data to a new variable without copying the original data. It takes an rvalue reference as its first parameter, and any additional parameters must have default values. Move constructors can significantly increase your program's efficiency when passing around large objects.
201201
202202
```cpp
203203
Box(Box&& other);
204204
```
205205

206-
The compiler chooses a move constructor in certain situations where the object is being initialized by another object of the same type that is about to be destroyed and no longer needs it resources. The following example shows one case when a move constructor is selected by overload resolution. The variable *box* returned by get_Box() is an *xvalue* (eXpiring value) which is about to go out of scope. To provide motivation for this example, let's give Box a large vector of strings that represent its contents. Rather than copying the vector and its strings, the move constructor "steals" it from the expiring value "box" so that the vector now belongs to the new object. The call to `std::move` is all that's needed because both `vector` and `string` classes implement their own move constructors.
206+
The compiler chooses a move constructor in certain situations where the object is being initialized by another object of the same type that is about to be destroyed and no longer needs its resources. The following example shows one case when a move constructor is selected by overload resolution. In the constructor that calls `get_Box()`, the returned value is an *xvalue* (eXpiring value). It is not assigned to any variable and is therefore about to go out of scope. To provide motivation for this example, let's give Box a large vector of strings that represent its contents. Rather than copying the vector and its strings, the move constructor "steals" it from the expiring value "box" so that the vector now belongs to the new object. The call to `std::move` is all that's needed because both `vector` and `string` classes implement their own move constructors.
207207

208208
```cpp
209209
#include <iostream>

docs/cppcx/platform-arrayreference-class.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Platform::ArrayReference Class"
3-
ms.date: "12/30/2016"
3+
ms.date: "10/16/2019"
44
ms.topic: "reference"
55
f1_keywords: ["VCCORLIB/Platform::ArrayReference::ArrayReference"]
66
helpviewer_keywords: ["Platform::ArrayReference Class"]
@@ -110,7 +110,7 @@ A handle-to-object of type `Array<TArg>^`
110110

111111
### Remarks
112112

113-
[Platform::ArrayReference](../cppcx/platform-arrayreference-class.md) and [Platform::Array](../cppcx/platform-array-class.md) are standard C++ class templates, not ref classes.
113+
[Platform::ArrayReference](../cppcx/platform-arrayreference-class.md) is a standard C++ class template, and [Platform::Array](../cppcx/platform-array-class.md) is a ref class.
114114

115115
## See also
116116

docs/cppcx/platform-string-class.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Platform::String Class"
3-
ms.date: "12/30/2016"
3+
ms.date: "10/16/2019"
44
ms.topic: "reference"
55
f1_keywords: ["VCCORLIB/Platform::String::String", "VCCORLIB/Platform::String::Begin", "VCCORLIB/Platform::String::CompareOrdinal", "VCCORLIB/Platform::String::Concat", "VCCORLIB/Platform::String::Data", "VCCORLIB/Platform::String::Dispose", "VCCORLIB/Platform::String::End", "VCCORLIB/Platform::String::Equals", "VCCORLIB/Platform::String::GetHashCode", "VCCORLIB/Platform::String::IsEmpty", "VCCORLIB/Platform::String::IsFastPass", "VCCORLIB/Platform::String::Length", "VCCORLIB/Platform::String::ToString"]
66
helpviewer_keywords: ["Platform::String"]
@@ -98,12 +98,12 @@ A pointer to the beginning of the current string.
9898

9999
## <a name="compareordinal"></a> String::CompareOrdinal Method
100100

101-
Compares two `String` objects by evaluating the numeric values of the corresponding characters in the two string values represented by the objects.
101+
Static method that compares two `String` objects by evaluating the numeric values of the corresponding characters in the two string values represented by the objects.
102102

103103
### Syntax
104104

105105
```cpp
106-
int CompareOrdinal( String^ str1, String^ str2 );
106+
static int CompareOrdinal( String^ str1, String^ str2 );
107107
```
108108
109109
### Parameters
@@ -216,7 +216,7 @@ The object to compare.
216216
217217
### Remarks
218218
219-
This method is equivalent to the [String::CompareOrdinal](#compareordinal). In the first overload, it is expected the `str` parameter can be cast to a String^ object.
219+
This method is equivalent to the static [String::CompareOrdinal](#compareordinal). In the first overload, it is expected the `str` parameter can be cast to a String^ object.
220220
221221
## <a name="gethashcode"></a> String::GetHashCode Method
222222

docs/preprocessor/variadic-macros.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Variadic macros"
3-
ms.date: "08/29/2019"
3+
ms.date: "10/17/2019"
44
helpviewer_keywords: ["variadic macros [C++]", "__VA_ARGS__ variadic macro specifier"]
55
ms.assetid: 51e757dc-0134-4bb2-bb74-64ea5ad75134
66
---
@@ -12,7 +12,7 @@ Variadic macros are function-like macros that contain a variable number of argum
1212

1313
To use variadic macros, the ellipsis may be specified as the final formal argument in a macro definition, and the replacement identifier `__VA_ARGS__` may be used in the definition to insert the extra arguments. `__VA_ARGS__` is replaced by all of the arguments that match the ellipsis, including commas between them.
1414

15-
The C Standard specifies that at least one argument must be passed to the ellipsis, to ensure the macro doesn't resolve to an expression with a trailing comma. The traditional Microsoft C++ implementation suppresses a trailing comma if no arguments are passed to the ellipsis.
15+
The C Standard specifies that at least one argument must be passed to the ellipsis, to ensure the macro doesn't resolve to an expression with a trailing comma. The traditional Microsoft C++ implementation suppresses a trailing comma if no arguments are passed to the ellipsis. When the `/experimental:preprocessor` compiler option is set, the trailing comma is not suppressed.
1616

1717
## Example
1818

0 commit comments

Comments
 (0)