Skip to content

Commit 354edd3

Browse files
TylerMSFTTylerMSFT
authored andcommitted
acrolinx
1 parent 2bd620a commit 354edd3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/cpp/initializers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Value initialization does the following:
180180
181181
- for classes with at least one public constructor, the default constructor is called
182182
183-
- for non-union classes with no declared constructors, the object is zero-initialized and the default constructor is called
183+
- for nonunion classes with no declared constructors, the object is zero-initialized and the default constructor is called
184184
185185
- for arrays, every element is value-initialized
186186
@@ -520,7 +520,7 @@ Reference-type variables can be declared without initializers only in the follow
520520
extern int& iVal;
521521
```
522522

523-
When initializing a reference-type variable, the compiler uses the decision graph shown in the following figure to select between creating a reference to an object or creating a temporary object to which the reference points.
523+
When initializing a reference-type variable, the compiler uses the decision graph shown in the following figure to select between creating a reference to an object or creating a temporary object to which the reference points:
524524

525525
:::image type="complex" source="../cpp/media/vc38s71.gif" alt-text="Decision graph for initialization of reference types.":::
526526
The decision graph begins with: is the initializer an lvalue of the same type or a type derived from the type of reference? If yes, the reference refers to the object specified in the initializer. If no, the next decision is whether the reference-type variable is a const T reference being initialized and can the initializer be implicitly converted to a T? If yes, the temporary is created and the reference variable becomes a name for that temporary. If no, it's an error.

0 commit comments

Comments
 (0)