Skip to content

Commit 864152b

Browse files
Merge pull request #4864 from TylerMSFT/alt-text2
fix image tag
2 parents a238a77 + 354edd3 commit 864152b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/cpp/initializers.md

Lines changed: 3 additions & 3 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,9 +520,9 @@ 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

525-
::image type="complex" source="../cpp/media/vc38s71.gif" alt-text="Decision graph for initialization of reference types.":::
525+
:::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.
527527
:::image-end:::
528528
Decision graph for initialization of reference types

0 commit comments

Comments
 (0)