You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provides access to an array of elements in which each member is of the specified type.
11
12
@@ -18,9 +19,8 @@ class initializer_list
18
19
19
20
### Parameters
20
21
21
-
|Parameter|Description|
22
-
|---------------|-----------------|
23
-
|*Type*|The element data type to be stored in the `initializer_list`.|
22
+
*Type*\
23
+
The element data type to be stored in the `initializer_list`.
24
24
25
25
## Remarks
26
26
@@ -30,24 +30,24 @@ An `initializer_list` can be constructed using a braced initializer list:
30
30
initializer_list<int> i1{ 1, 2, 3, 4 };
31
31
```
32
32
33
-
The compiler transforms braced initializer lists with homogeneous elements into an `initializer_list` whenever the function signature requires an `initializer_list`. For more details on using `initializer_list`, see [Uniform Initialization and Delegating Constructors](../cpp/uniform-initialization-and-delegating-constructors.md)
33
+
The compiler transforms braced initializer lists with homogeneous elements into an `initializer_list` whenever the function signature requires an `initializer_list`. For more information about using `initializer_list`, see [Uniform initialization and delegating constructors](../cpp/uniform-initialization-and-delegating-constructors.md)
34
34
35
35
### Constructors
36
36
37
37
|Constructor|Description|
38
38
|-|-|
39
-
|[initializer_list](../standard-library/forward-list-class.md#forward_list)|Constructs an object of type `initializer_list`.|
39
+
|[initializer_list](#initializer_list)|Constructs an object of type `initializer_list`.|
40
40
41
41
### Typedefs
42
42
43
43
|Type name|Description|
44
44
|-|-|
45
-
|value_type|The type of the elements in the `initializer_list`.|
46
-
|reference|A type that provides a reference to an element in the `initializer_list`.|
47
-
|const_reference|A type that provides a constant reference to an element in the `initializer_list`.|
48
-
|size_type|A type that represents the number of elements in the `initializer_list`.|
49
-
|iterator|A type that provides an iterator for the `initializer_list`.|
50
-
|const_iterator|A type that provides a constant iterator for the `initializer_list`.|
45
+
|`value_type`|The type of the elements in the `initializer_list`.|
46
+
|`reference`|A type that provides a reference to an element in the `initializer_list`.|
47
+
|`const_reference`|A type that provides a constant reference to an element in the `initializer_list`.|
48
+
|`size_type`|A type that represents the number of elements in the `initializer_list`.|
49
+
|`iterator`|A type that provides an iterator for the `initializer_list`.|
50
+
|`const_iterator`|A type that provides a constant iterator for the `initializer_list`.|
51
51
52
52
### Member functions
53
53
@@ -71,12 +71,10 @@ Returns a pointer to the first element in an `initializer_list`.
|*First*|The position of the first element in the range of elements to be copied.|
106
-
|*Last*|The position of the first element beyond the range of elements to be copied.|
101
+
*First*\
102
+
The position of the first element in the range of elements to be copied.
103
+
104
+
*Last*\
105
+
The position of the first element beyond the range of elements to be copied.
107
106
108
107
### Remarks
109
108
110
-
An `initializer_list` is based on an array of objects of the specified type. Copying an `initializer_list` creates a second instance of a list pointing to the same objects; the underlying objects are not copied.
109
+
An `initializer_list` is based on an array of objects of the specified type. Copying an `initializer_list` creates a second instance of a list pointing to the same objects; the underlying objects aren't copied.
0 commit comments