Skip to content

Commit 3f45a9d

Browse files
author
Colin Robertson
authored
Fix things that look like parameters. (#3978)
* Fix things that look like parameters. * Acrolinxy * Misc fixes * Other fixes * Fix typos * Acrolinx some more
1 parent 8538aac commit 3f45a9d

13 files changed

+513
-521
lines changed

docs/atl/reference/ccomsafearray-class.md

Lines changed: 205 additions & 205 deletions
Large diffs are not rendered by default.

docs/build/working-with-project-properties.md

Lines changed: 31 additions & 31 deletions
Large diffs are not rendered by default.

docs/c-runtime-library/outp-outpw-outpd.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ f1_keywords: ["_outpw", "_outpd", "_outp", "outp", "outpw", "outpd"]
1010
helpviewer_keywords: ["outpw function", "words", "_outpd function", "outpd function", "outp function", "ports, writing bytes at", "bytes, writing to ports", "words, writing to ports", "double words", "double words, writing to ports", "_outpw function", "_outp function"]
1111
ms.assetid: c200fe22-41f6-46fd-b0be-ebb805b35181
1212
---
13-
# outp, outpw, _outp, _outpw, _outpd
13+
# `outp`, `outpw`, `_outp`, `_outpw`, `_outpd`
1414

1515
Outputs, at a port, a byte (`outp`, `_outp`), a word (`outpw`, `_outpw`), or a double word (`_outpd`).
1616

@@ -37,10 +37,10 @@ unsigned long _outpd(
3737

3838
### Parameters
3939

40-
*port*\
40+
*`port`*\
4141
Port number.
4242

43-
*data_byte, data_word*\
43+
*`data_byte`*, *`data_word`*\
4444
Output values.
4545

4646
## Return Value
@@ -49,7 +49,7 @@ The functions return the data output. There's no error return.
4949

5050
## Remarks
5151

52-
The `_outp`, `_outpw`, and `_outpd` functions write a byte, a word, and a double word, respectively, to the specified output port. The *port* argument can be any unsigned integer in the range 0 - 65,535. *data_byte* can be any integer in the range 0 - 255. *data_word* can be any value in the range of an integer, an unsigned short integer, and an unsigned long integer, respectively.
52+
The `_outp`, `_outpw`, and `_outpd` functions write a byte, a word, and a double word, respectively, to the specified output port. The *`port`* argument can be any unsigned integer in the range 0 - 65,535. *`data_byte`* can be any integer in the range 0 - 255. *`data_word`* can be any value in the range of an integer, an unsigned short integer, and an unsigned long integer, respectively.
5353

5454
Because these functions write directly to an I/O port, they can't be used in user-mode Windows code.
5555

docs/cpp/variant-t-variant-t.md

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ f1_keywords: ["_variant_t::_variant_t"]
66
helpviewer_keywords: ["_variant_t class [C++], constructor", "_variant_t method [C++]"]
77
ms.assetid: a50e5b33-d4c6-4a26-8e7e-a0a25fd9895b
88
---
9-
# _variant_t::_variant_t
9+
# `_variant_t::_variant_t`
1010

1111
**Microsoft Specific**
1212

1313
Constructs a `_variant_t` object.
1414

1515
## Syntax
1616

17-
```
17+
```cpp
1818
_variant_t( ) throw( );
1919

2020
_variant_t(
@@ -120,114 +120,114 @@ _variant_t(
120120
) throw();
121121
```
122122

123-
#### Parameters
123+
### Parameters
124124

125-
*varSrc*<br/>
125+
*`varSrc`*\
126126
A `VARIANT` object to be copied into the new `_variant_t` object.
127127

128-
*pVarSrc*<br/>
128+
*`pVarSrc`*\
129129
Pointer to a `VARIANT` object to be copied into the new `_variant_t` object.
130130

131-
*var_t_Src*<br/>
131+
*`var_t_Src`*\
132132
A `_variant_t` object to be copied into the new `_variant_t` object.
133133

134-
*fCopy*<br/>
134+
*`fCopy`*\
135135
If **`false`**, the supplied `VARIANT` object is attached to the new `_variant_t` object without making a new copy by `VariantCopy`.
136136

137-
*ISrc, sSrc*<br/>
137+
*`ISrc`*, *`sSrc`*\
138138
An integer value to be copied into the new `_variant_t` object.
139139

140-
*vtSrc*<br/>
140+
*`vtSrc`*\
141141
The `VARTYPE` for the new `_variant_t` object.
142142

143-
*fltSrc, dblSrc*<br/>
143+
*`fltSrc`*, *`dblSrc`*\
144144
A numerical value to be copied into the new `_variant_t` object.
145145

146-
*cySrc*<br/>
146+
*`cySrc`*\
147147
A `CY` object to be copied into the new `_variant_t` object.
148148

149-
*bstrSrc*<br/>
149+
*`bstrSrc`*\
150150
A `_bstr_t` object to be copied into the new `_variant_t` object.
151151

152-
*strSrc, wstrSrc*<br/>
152+
*`strSrc`*, *`wstrSrc`*\
153153
A string to be copied into the new `_variant_t` object.
154154

155-
*bSrc*<br/>
155+
*`bSrc`*\
156156
A **`bool`** value to be copied into the new `_variant_t` object.
157157

158-
*pIUknownSrc*<br/>
158+
*`pIUknownSrc`*\
159159
COM interface pointer to a VT_UNKNOWN object to be encapsulated into the new `_variant_t` object.
160160

161-
*pDispSrc*<br/>
161+
*`pDispSrc`*\
162162
COM interface pointer to a VT_DISPATCH object to be encapsulated into the new `_variant_t` object.
163163

164-
*decSrc*<br/>
164+
*`decSrc`*\
165165
A `DECIMAL` value to be copied into the new `_variant_t` object.
166166

167-
*bSrc*<br/>
167+
*`bSrc`*\
168168
A `BYTE` value to be copied into the new `_variant_t` object.
169169

170-
*cSrc*<br/>
170+
*`cSrc`*\
171171
A **`char`** value to be copied into the new `_variant_t` object.
172172

173-
*usSrc*<br/>
173+
*`usSrc`*\
174174
A **`unsigned short`** value to be copied into the new `_variant_t` object.
175175

176-
*ulSrc*<br/>
176+
*`ulSrc`*\
177177
A **`unsigned long`** value to be copied into the new `_variant_t` object.
178178

179-
*iSrc*<br/>
179+
*`iSrc`*\
180180
An **`int`** value to be copied into the new `_variant_t` object.
181181

182-
*uiSrc*<br/>
182+
*`uiSrc`*\
183183
An **`unsigned int`** value to be copied into the new `_variant_t` object.
184184

185-
*i8Src*<br/>
185+
*`i8Src`*\
186186
An **`__int64`** value to be copied into the new `_variant_t` object.
187187

188-
*ui8Src*<br/>
189-
An **unsigned __int64** value to be copied into the new `_variant_t` object.
188+
*`ui8Src`*\
189+
An **`unsigned __int64`** value to be copied into the new `_variant_t` object.
190190

191191
## Remarks
192192

193-
- **_variant_t( )** Constructs an empty `_variant_t` object, `VT_EMPTY`.
193+
- **`_variant_t()`** Constructs an empty `_variant_t` object, `VT_EMPTY`.
194194

195-
- **_variant_t( VARIANT&** *varSrc* **)** Constructs a `_variant_t` object from a copy of the `VARIANT` object. The variant type is retained.
195+
- **`_variant_t( VARIANT& varSrc )`** Constructs a `_variant_t` object from a copy of the `VARIANT` object. The variant type is retained.
196196

197-
- **_variant_t( VARIANT**<strong>\*</strong> *pVarSrc* **)** Constructs a `_variant_t` object from a copy of the `VARIANT` object. The variant type is retained.
197+
- **`_variant_t( VARIANT* pVarSrc )`** Constructs a `_variant_t` object from a copy of the `VARIANT` object. The variant type is retained.
198198

199-
- **_variant_t( _variant_t&** *var_t_Src* **)** Constructs a `_variant_t` object from another `_variant_t` object. The variant type is retained.
199+
- **`_variant_t( _variant_t& var_t_Src )`** Constructs a `_variant_t` object from another `_variant_t` object. The variant type is retained.
200200

201-
- **_variant_t( VARIANT&** *varSrc* **, bool** `fCopy` **)** Constructs a `_variant_t` object from an existing `VARIANT` object. If *fCopy* is **`false`**, the **VARIANT** object is attached to the new object without making a copy.
201+
- **`_variant_t( VARIANT& varSrc, bool fCopy )`** Constructs a `_variant_t` object from an existing `VARIANT` object. If *`fCopy`* is **`false`**, the **`VARIANT`** object is attached to the new object without making a copy.
202202

203-
- **_variant_t( short** *sSrc* **, VARTYPE** `vtSrc` **= VT_I2 )** Constructs a `_variant_t` object of type VT_I2 or VT_BOOL from a **`short`** integer value. Any other `VARTYPE` results in an E_INVALIDARG error.
203+
- **`_variant_t( short sSrc, VARTYPE vtSrc = VT_I2 )`** Constructs a `_variant_t` object of type `VT_I2` or `VT_BOOL` from a **`short`** integer value. Any other `VARTYPE` results in an `E_INVALIDARG` error.
204204

205-
- **_variant_t( long** `lSrc` **, VARTYPE** `vtSrc` **= VT_I4 )** Constructs a `_variant_t` object of type VT_I4, VT_BOOL, or VT_ERROR from a **`long`** integer value. Any other `VARTYPE` results in an E_INVALIDARG error.
205+
- **`_variant_t( long lSrc, VARTYPE vtSrc = VT_I4 )`** Constructs a `_variant_t` object of type `VT_I4`, `VT_BOOL`, or `VT_ERROR` from a **`long`** integer value. Any other `VARTYPE` results in an `E_INVALIDARG` error.
206206

207-
- **_variant_t( float** `fltSrc` **)** Constructs a `_variant_t` object of type VT_R4 from a **`float`** numerical value.
207+
- **`_variant_t( float fltSrc )`** Constructs a `_variant_t` object of type `VT_R4` from a **`float`** numerical value.
208208

209-
- **_variant_t( double** `dblSrc` **, VARTYPE** `vtSrc` **= VT_R8 )** Constructs a `_variant_t` object of type VT_R8 or VT_DATE from a **`double`** numerical value. Any other `VARTYPE` results in an E_INVALIDARG error.
209+
- **`_variant_t( double dblSrc, VARTYPE vtSrc = VT_R8 )`** Constructs a `_variant_t` object of type `VT_R8` or `VT_DATE` from a **`double`** numerical value. Any other `VARTYPE` results in an `E_INVALIDARG` error.
210210

211-
- **_variant_t( CY&** `cySrc` **)** Constructs a `_variant_t` object of type VT_CY from a `CY` object.
211+
- **`_variant_t( CY& cySrc )`** Constructs a `_variant_t` object of type `VT_CY` from a `CY` object.
212212

213-
- **_variant_t( _bstr_t&** `bstrSrc` **)** Constructs a `_variant_t` object of type VT_BSTR from a `_bstr_t` object. A new `BSTR` is allocated.
213+
- *`*_variant_t( _bstr_t& bstrSrc )`** Constructs a `_variant_t` object of type `VT_BSTR` from a `_bstr_t` object. A new `BSTR` is allocated.
214214

215-
- **_variant_t( wchar_t** <strong>\*</strong> *wstrSrc* **)** Constructs a `_variant_t` object of type VT_BSTR from a Unicode string. A new `BSTR` is allocated.
215+
- **`_variant_t( wchar_t* wstrSrc )`** Constructs a `_variant_t` object of type `VT_BSTR` from a Unicode string. A new `BSTR` is allocated.
216216

217-
- **_variant_t( char**<strong>\*</strong> `strSrc` **)** Constructs a `_variant_t` object of type VT_BSTR from a string. A new `BSTR` is allocated.
217+
- **`_variant_t( char* strSrc )`** Constructs a `_variant_t` object of type `VT_BSTR` from a string. A new `BSTR` is allocated.
218218

219-
- **_variant_t( bool** `bSrc` **)** Constructs a `_variant_t` object of type VT_BOOL from a **`bool`** value.
219+
- **`_variant_t( bool bSrc )`** Constructs a `_variant_t` object of type `VT_BOOL` from a **`bool`** value.
220220

221-
- **_variant_t( IUnknown**<strong>\*</strong> `pIUknownSrc` **, bool** `fAddRef` **= true )** Constructs a `_variant_t` object of type VT_UNKNOWN from a COM interface pointer. If `fAddRef` is **`true`**, then `AddRef` is called on the supplied interface pointer to match the call to `Release` that will occur when the `_variant_t` object is destroyed. It is up to you to call `Release` on the supplied interface pointer. If `fAddRef` is **`false`**, this constructor takes ownership of the supplied interface pointer; do not call `Release` on the supplied interface pointer.
221+
- **`_variant_t( IUnknown* pIUknownSrc, bool fAddRef = true )`** Constructs a `_variant_t` object of type `VT_UNKNOWN` from a COM interface pointer. If `fAddRef` is **`true`**, then `AddRef` is called on the supplied interface pointer to match the call to `Release` that will occur when the `_variant_t` object is destroyed. It is up to you to call `Release` on the supplied interface pointer. If `fAddRef` is **`false`**, this constructor takes ownership of the supplied interface pointer; don't call `Release` on the supplied interface pointer.
222222

223-
- **_variant_t( IDispatch**<strong>\*</strong> `pDispSrc` **, bool** `fAddRef` **= true )** Constructs a `_variant_t` object of type VT_DISPATCH from a COM interface pointer. If `fAddRef` is **`true`**, then `AddRef` is called on the supplied interface pointer to match the call to `Release` that will occur when the `_variant_t` object is destroyed. It is up to you to call `Release` on the supplied interface pointer. If `fAddRef` is **`false`**, this constructor takes ownership of the supplied interface pointer; do not call `Release` on the supplied interface pointer.
223+
- **`_variant_t( IDispatch* pDispSrc, bool fAddRef = true )`** Constructs a `_variant_t` object of type `VT_DISPATCH` from a COM interface pointer. If `fAddRef` is **`true`**, then `AddRef` is called on the supplied interface pointer to match the call to `Release` that will occur when the `_variant_t` object is destroyed. It's up to you to call `Release` on the supplied interface pointer. If `fAddRef` is **`false`**, this constructor takes ownership of the supplied interface pointer; don't call `Release` on the supplied interface pointer.
224224

225-
- **_variant_t( DECIMAL&** `decSrc` **)** Constructs a `_variant_t` object of type VT_DECIMAL from a `DECIMAL` value.
225+
- **`_variant_t( DECIMAL& decSrc )`** Constructs a `_variant_t` object of type `VT_DECIMAL` from a `DECIMAL` value.
226226

227-
- **_variant_t( BYTE** `bSrc` **)** Constructs a `_variant_t` object of type `VT_UI1` from a `BYTE` value.
227+
- **`_variant_t( BYTE bSrc )`** Constructs a `_variant_t` object of type `VT_UI1` from a `BYTE` value.
228228

229229
**END Microsoft Specific**
230230

231231
## See also
232232

233-
[_variant_t Class](../cpp/variant-t-class.md)
233+
[`_variant_t` Class](../cpp/variant-t-class.md)

docs/extensions/constraints-on-generic-type-parameters-cpp-cli.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
---
2-
description: "Learn more about: Constraints on Generic Type Parameters (C++/CLI)"
3-
title: "Constraints on Generic Type Parameters (C++/CLI)"
2+
description: "Learn more about: Constraints on generic type parameters (C++/CLI)"
3+
title: "Constraints on generic type parameters (C++/CLI)"
44
ms.date: "10/12/2018"
55
ms.topic: "reference"
66
f1_keywords: ["where"]
77
helpviewer_keywords: ["where keyword [C++]", "constraints, C++"]
88
ms.assetid: eb828cc9-684f-48a3-a898-b327700c0a63
99
---
10-
# Constraints on Generic Type Parameters (C++/CLI)
10+
# Constraints on generic type parameters (C++/CLI)
1111

12-
In generic type or method declarations, you can qualify a type parameter with constraints. A constraint is a requirement that types used as type arguments must satisfy. For example, a constraint might be that the type argument must implement a certain interface or inherit from a specific class.
12+
In generic type or method declarations, you can qualify a type parameter with *constraints*. A constraint is a requirement that types used as type arguments must satisfy. For example, a constraint might be that the type argument must implement a certain interface or inherit from a specific class.
1313

1414
Constraints are optional; not specifying a constraint on a parameter is equivalent to constraining that parameter to <xref:System.Object>.
1515

1616
## Syntax
1717

1818
```cpp
19-
where type-parameter: constraint list
19+
where type-parameter: constraint-list
2020
```
2121

2222
### Parameters
2323

24-
*type-parameter*<br/>
24+
*`type-parameter`*\
2525
One of the type parameters, to be constrained.
2626

27-
*constraint list*<br/>
28-
*constraint list* is a comma-separated list of constraint specifications. The list can include interfaces to be implemented by the type parameter.
27+
*`constraint-list`*\
28+
*`constraint-list`* is a comma-separated list of constraint specifications. The list can include interfaces to be implemented by the type parameter.
2929

3030
The list can also include a class. For the type argument to satisfy a base class constraint, it must be the same class as the constraint or derive from the constraint.
3131

32-
You can also specify **gcnew()** to indicate the type argument must have a public parameterless constructor; or **ref class** to indicate the type argument must be a reference type, including any class, interface, delegate, or array type; or **value class** to indicate the type argument must be a value type. Any value type except Nullable\<T> can be specified.
32+
You can also specify **`gcnew()`** to indicate the type argument must have a public parameterless constructor; or **`ref class`** to indicate the type argument must be a reference type, including any class, interface, delegate, or array type; or **`value class`** to indicate the type argument must be a value type. Any value type except `Nullable<T>` can be specified.
3333

34-
You can also specify a generic parameter as a constraint. The type argument supplied for the type you are constraining must be or derive from the type of the constraint. This is called a naked type constraint.
34+
You can also specify a generic parameter as a constraint. The type argument supplied for the type you're constraining must be or derive from the type of the constraint. This parameter is called a *naked type constraint*.
3535

3636
## Remarks
3737

38-
The constraint clause consists of **where** followed by a type parameter, a colon (**:**), and the constraint, which specifies the nature of the restriction on the type parameter. **where** is a context-sensitive keyword; see [Context-Sensitive Keywords](context-sensitive-keywords-cpp-component-extensions.md) for more information. Separate multiple **where** clauses with a space.
38+
The constraint clause consists of **`where`** followed by a type parameter, a colon (**`:`**), and the constraint, which specifies the nature of the restriction on the type parameter. **`where`** is a context-sensitive keyword. For more information, see [Context-sensitive keywords](context-sensitive-keywords-cpp-component-extensions.md). Separate multiple **`where`** clauses with a space.
3939

4040
Constraints are applied to type parameters to place limitations on the types that can be used as arguments for a generic type or method.
4141

@@ -54,11 +54,11 @@ ref class List {};
5454
5555
This constraint requires that a type argument used for `T` implements `IComparable<T>` at compile time. It also allows interface methods, such as `CompareTo`, to be called. No cast is needed on an instance of the type parameter to call interface methods.
5656
57-
Static methods in the type argument's class cannot be called through the type parameter; they can be called only through the actual named type.
57+
Static methods in the type argument's class can't be called through the type parameter; they can be called only through the actual named type.
5858
59-
A constraint cannot be a value type, including built-in types such as **`int`** or **`double`**. Since value types cannot have derived classes, only one class would ever be able to satisfy the constraint. In that case, the generic can be rewritten with the type parameter replaced by the specific value type.
59+
A constraint can't be a value type, including built-in types such as **`int`** or **`double`**. Since value types cannot have derived classes, only one class could ever satisfy the constraint. In that case, the generic can be rewritten with the type parameter replaced by the specific value type.
6060
61-
Constraints are required in some cases since the compiler will not allow the use of methods or other features of an unknown type unless the constraints imply that the unknown type supports the methods or interfaces.
61+
Constraints are required in some cases since the compiler won't allow the use of methods or other features of an unknown type unless the constraints imply that the unknown type supports the methods or interfaces.
6262
6363
Multiple constraints for the same type parameter can be specified in a comma-separated list
6464
@@ -86,13 +86,13 @@ generic <typename K, typename V>
8686
ref class Dictionary {};
8787
```
8888
89-
To summarize, use constraints in your code according to the following rules:
89+
Use constraints in your code according to the following rules:
9090
9191
- If multiple constraints are listed, the constraints may be listed in any order.
9292
93-
- Constraints can also be class types, such as abstract base classes. However, constraints cannot be value types or sealed classes.
93+
- Constraints can also be class types, such as abstract base classes. However, constraints can't be value types or `sealed` classes.
9494
95-
- Constraints cannot themselves be type parameters, but they can involve the type parameters in an open constructed type. For example:
95+
- Constraints can't themselves be type parameters, but they can involve the type parameters in an open constructed type. For example:
9696
9797
```cpp
9898
// generics_constraints_4.cpp
@@ -167,7 +167,7 @@ int main() {
167167
"grandfather" is a senior
168168
```
169169

170-
When a generic type parameter is used as a constraint, it is called a naked type constraint. Naked type constraints are useful when a member function with its own type parameter needs to constrain that parameter to the type parameter of the containing type.
170+
When a generic type parameter is used as a constraint, it's called a *naked type constraint*. Naked type constraints are useful when a member function with its own type parameter needs to constrain that parameter to the type parameter of the containing type.
171171

172172
In the following example, `T` is a naked type constraint in the context of the `Add` method.
173173

0 commit comments

Comments
 (0)