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
Copy file name to clipboardExpand all lines: docs/standard-library/pair-structure.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,13 +62,14 @@ A pair whose values are to be used to initialize the elements of another pair.
62
62
63
63
## Return Value
64
64
65
-
The first (default) constructor initializes first element of the pair to the default of type `T1` and second element to default of type `T2`.
65
+
The first (default) constructor initializes the first element of the pair to the default of type `T1` and the second element to default of type `T2`. It is defined if both types are default-constructible.
66
66
67
-
The second constructor initializes first element of the pair to *Val1* and second to *Val2.*
67
+
The second constructor initializes the first element of the pair to *Val1* and the second to *Val2.* It is defined if both types are copy-constructible.
68
68
69
-
The third (template) constructor initializes first element of the pair to `Right`. **first** and second to `Right`. **second**.
69
+
The third (template) constructor initializes the first element of the pair to `Right`. **first** and the second to `Right`. **second**. It is defined if both types of the pair are constructible from the value types provided.
70
70
71
-
The fourth constructor initializes first element of the pair to *Val1* and second to *Val2* using [Rvalue Reference Declarator: &&](../cpp/rvalue-reference-declarator-amp-amp.md).
71
+
72
+
The fourth constructor initializes the first element of the pair to *Val1* and the second to *Val2* using [Rvalue Reference Declarator: &&](../cpp/rvalue-reference-declarator-amp-amp.md). It is defined if both types of the pair are constructible from the value types provided.
0 commit comments