Skip to content

Commit 531ac4f

Browse files
openpublishbuildColin Robertson
authored and
Colin Robertson
committed
Confirm merge from FromPublicMasterBranch to master to sync with https://github.com/MicrosoftDocs/cpp-docs (branch master) (#475)
* More || operator rendering fixes * Update compiler-warnings-that-are-off-by-default.md Added missing link. C4682 * Incorrect instructions on how to get FtmBase To get FtmBase, you list it as a template parameter. There is no RuntimeClass::FtmBase flag. * describe the variadic template args now used, fill in missing parts This page was documenting the pre-Variadic template arg version of this function, was missing several important things so I've updated it * pr feedback from Raymond thank you Raymond * FtmBase is a class, not a member of RuntimeClassType * fixed pre-existing typo * Update get-osfhandle.md * Update open-osfhandle.md * Update fdopen-wfdopen.md * Update fdopen-wfdopen.md Fix broken formatting * Update precedence-and-order-of-evaluation.md Adjust formatting for clarity, where possible. * Update get-osfhandle.md _close Modify wording around using _close on file descriptors owned by FILE*s * Update open-osfhandle.md Modify wording around using _close on file descriptors owned by FILE*s * Merge Live (MicrosoftDocs#474) * Create the quickstart TOC entries * Add link to something useful after build. * Fix link * Quickstart -> Tutorial * Confirm merge from FromPublicMasterBranch to master to sync with https://github.com/MicrosoftDocs/cpp-docs (branch master) (MicrosoftDocs#469) * Update compiler-warnings-that-are-off-by-default.md Added missing link. C4682 * describe the variadic template args now used, fill in missing parts This page was documenting the pre-Variadic template arg version of this function, was missing several important things so I've updated it * pr feedback from Raymond thank you Raymond * FtmBase is a class, not a member of RuntimeClassType * fixed pre-existing typo * Update get-osfhandle.md * Update open-osfhandle.md * Update fdopen-wfdopen.md * Update fdopen-wfdopen.md Fix broken formatting * Confirm merge from FromPublicMasterBranch to master to sync with https://github.com/MicrosoftDocs/cpp-docs (branch master) (#473) * Update compiler-warnings-that-are-off-by-default.md Added missing link. C4682 * describe the variadic template args now used, fill in missing parts This page was documenting the pre-Variadic template arg version of this function, was missing several important things so I've updated it * pr feedback from Raymond thank you Raymond * FtmBase is a class, not a member of RuntimeClassType * fixed pre-existing typo * Update get-osfhandle.md * Update open-osfhandle.md * Update fdopen-wfdopen.md * Update fdopen-wfdopen.md Fix broken formatting * Update get-osfhandle.md _close Modify wording around using _close on file descriptors owned by FILE*s * Update open-osfhandle.md Modify wording around using _close on file descriptors owned by FILE*s * alternatios -> alternations
1 parent deaf693 commit 531ac4f

File tree

3 files changed

+17
-21
lines changed

3 files changed

+17
-21
lines changed

docs/c-language/precedence-and-order-of-evaluation.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ The precedence and associativity of C operators affect the grouping and evaluati
2020

2121
The following table summarizes the precedence and associativity (the order in which the operands are evaluated) of C operators, listing them in order of precedence from highest to lowest. Where several operators appear together, they have equal precedence and are evaluated according to their associativity. The operators in the table are described in the sections beginning with [Postfix Operators](../c-language/postfix-operators.md). The rest of this section gives general information about precedence and associativity.
2222

23-
### Precedence and Associativity of C Operators
23+
## Precedence and Associativity of C Operators
2424

25-
|Symbol1|Type of Operation|Associativity|
25+
|Symbol <sup>1</sup>|Type of Operation|Associativity|
2626
|-------------|-----------------------|-------------------|
27-
|**[ ] ( ) . ->** postfix `++` and postfix **--**|Expression|Left to right|
28-
|prefix `++` and prefix **-- sizeof & \* + - ~ !**|Unary|Right to left|
27+
|**\[ ] ( ) . ->**<br /><br />**++** **--** (postfix)|Expression|Left to right|
28+
**sizeof & \* + - ~ !**<br /><br />**++ --** (prefix)|Unary|Right to left|
2929
|*typecasts*|Unary|Right to left|
3030
|**\* / %**|Multiplicative|Left to right|
3131
|**+ -**|Additive|Left to right|
32-
|**<\< >>**|Bitwise shift|Left to right|
32+
|**\<\< >>**|Bitwise shift|Left to right|
3333
|**\< > \<= >=**|Relational|Left to right|
3434
|**== !=**|Equality|Left to right|
3535
|**&**|Bitwise-AND|Left to right|
@@ -38,7 +38,7 @@ The precedence and associativity of C operators affect the grouping and evaluati
3838
|**&&**|Logical-AND|Left to right|
3939
|**&#124;&#124;**|Logical-OR|Left to right|
4040
|**? :**|Conditional-expression|Right to left|
41-
|**= \*= /= %=**<br /><br /> **+= -= <\<= >>=&=**<br /><br /> **^= &#124;=**|Simple and compound assignment2|Right to left|
41+
|**= \*= /= %=**<br /><br /> **+= -= \<\<= >>= &=**<br /><br /> **^= &#124;=**|Simple and compound assignment <sup>2</sup>|Right to left|
4242
|**,**|Sequential evaluation|Left to right|
4343

4444
1. Operators are listed in descending order of precedence. If several operators appear on the same line or in a group, they have equal precedence.
@@ -51,22 +51,20 @@ The precedence and associativity of C operators affect the grouping and evaluati
5151

5252
Logical operators also guarantee evaluation of their operands from left to right. However, they evaluate the smallest number of operands needed to determine the result of the expression. This is called "short-circuit" evaluation. Thus, some operands of the expression may not be evaluated. For example, in the expression
5353

54-
```
55-
x && y++
56-
```
54+
`x && y++`
5755

5856
the second operand, `y++`, is evaluated only if `x` is true (nonzero). Thus, `y` is not incremented if `x` is false (0).
5957

60-
**Examples**
58+
## Examples
6159

6260
The following list shows how the compiler automatically binds several sample expressions:
63-
61+
6462
|Expression|Automatic Binding|
6563
|----------------|-----------------------|
66-
|`a & b &#124;&#124; c`|`(a & b) &#124;&#124; c`|
67-
|`a = b &#124;&#124; c`|`a = (b &#124;&#124; c)`|
68-
|`q && r &#124;&#124; s--`|`(q && r) &#124;&#124; s--`|
69-
64+
|a & b &#124;&#124; c|(a & b) &#124;&#124; c|
65+
|a = b &#124;&#124; c|a = (b &#124;&#124; c)|
66+
|q && r &#124;&#124; s--|(q && r) &#124;&#124; s--|
67+
7068
In the first expression, the bitwise-AND operator (`&`) has higher precedence than the logical-OR operator (`||`), so `a & b` forms the first operand of the logical-OR operation.
7169

7270
In the second expression, the logical-OR operator (`||`) has higher precedence than the simple-assignment operator (`=`), so `b || c` is grouped as the right-hand operand in the assignment. Note that the value assigned to `a` is either 0 or 1.
@@ -77,13 +75,11 @@ x && y++
7775

7876
|Illegal Expression|Default Grouping|
7977
|------------------------|----------------------|
80-
|`p == 0 ? p += 1: p += 2`|`( p == 0 ? p += 1 : p ) += 2`|
78+
|p == 0 ? p += 1: p += 2|( p == 0 ? p += 1 : p ) += 2|
8179

8280
In this expression, the equality operator (`==`) has the highest precedence, so `p == 0` is grouped as an operand. The conditional-expression operator (`? :`) has the next-highest precedence. Its first operand is `p == 0`, and its second operand is `p += 1`. However, the last operand of the conditional-expression operator is considered to be `p` rather than `p += 2`, since this occurrence of `p` binds more closely to the conditional-expression operator than it does to the compound-assignment operator. A syntax error occurs because `+= 2` does not have a left-hand operand. You should use parentheses to prevent errors of this kind and produce more readable code. For example, you could use parentheses as shown below to correct and clarify the preceding example:
8381

84-
```
85-
( p == 0 ) ? ( p += 1 ) : ( p += 2 )
86-
```
82+
`( p == 0 ) ? ( p += 1 ) : ( p += 2 )`
8783

8884
## See Also
8985
[C Operators](../c-language/c-operators.md)

docs/standard-library/regular-expressions-cpp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The regular expression grammar to use is by specified by the use of one of the `
2626
- `extended`: The POSIX extended regular expressions or ERE.
2727
- `awk`: This is `extended`, but it has additional escapes for non-printing characters.
2828
- `grep`: This is `basic`, but it also allows newline ('\n') characters to separate alternations.
29-
- `egrep`: This is `extended`, but it also allows newline characters to separate alternatios.
29+
- `egrep`: This is `extended`, but it also allows newline characters to separate alternations.
3030

3131
By default, if no grammar is specified, `ECMAScript` is assumed. Only one grammar may be specified.
3232

docs/windows/runtimeclass-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ template <unsigned int classFlags, typename ...TInterfaces> class RuntimeClass;
3030

3131
#### Parameters
3232
`classFlags`
33-
Optional paramater. A combination of one or more [RuntimeClassType](../windows/runtimeclasstype-enumeration.md) enumeration values. The `__WRL_CONFIGURATION_LEGACY__` macro can be defined to change the default value of classFlags for all runtime classes in the project. If defined, RuntimeClass instances are non-agile by default. When not defined, RuntimeClass instances are agile by default. To avoid ambiguity always specify the Microsoft::WRL::FtmBase in `TInterfaces` or RuntimeClassType::InhibitFtmBase. Note, if InhibitFtmBase and FtmBase are both used the object will be agile.
33+
Optional paramater. A combination of one or more [RuntimeClassType](../windows/runtimeclasstype-enumeration.md) enumeration values. The `__WRL_CONFIGURATION_LEGACY__` macro can be defined to change the default value of classFlags for all runtime classes in the project. If defined, RuntimeClass instances are non-agile by default. When not defined, RuntimeClass instances are agile by default. To avoid ambiguity always specify the Microsoft::WRL::FtmBase in `TInterfaces` or RuntimeClassType::InhibitFtmBase. Note, if InhibitFtmBase and FtmBase are both used the object will be agile.
3434

3535
`TInterfaces`
3636
The list of interfaces the object implements beyond IUnknown, IInspectable or other interfaces controlled by [RuntimeClassType](../windows/runtimeclasstype-enumeration.md). It also may list other classes to be derived from, notably Microsoft::WRL::FtmBase to make the object agile and cause it to implement IMarshal.

0 commit comments

Comments
 (0)