From Jason Turner

[over.match.list]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpf79p2chf/{from.md → to.md} +15 -13
tmp/tmpf79p2chf/{from.md → to.md} RENAMED
@@ -1,25 +1,27 @@
1
  #### Initialization by list-initialization <a id="over.match.list">[[over.match.list]]</a>
2
 
3
  When objects of non-aggregate class type `T` are list-initialized such
4
  that [[dcl.init.list]] specifies that overload resolution is performed
5
- according to the rules in this section, overload resolution selects the
6
- constructor in two phases:
 
7
 
8
- - Initially, the candidate functions are the initializer-list
9
- constructors ([[dcl.init.list]]) of the class `T` and the argument
10
- list consists of the initializer list as a single argument.
11
- - If no viable initializer-list constructor is found, overload
12
- resolution is performed again, where the candidate functions are all
13
- the constructors of the class `T` and the argument list consists of
14
- the elements of the initializer list.
 
 
15
 
16
- If the initializer list has no elements and `T` has a default
17
- constructor, the first phase is omitted. In copy-list-initialization, if
18
- an `explicit` constructor is chosen, the initialization is ill-formed.
19
 
20
- [*Note 1*: This differs from other situations ([[over.match.ctor]], 
21
  [[over.match.copy]]), where only converting constructors are considered
22
  for copy-initialization. This restriction only applies if this
23
  initialization is part of the final result of overload
24
  resolution. — *end note*]
25
 
 
1
  #### Initialization by list-initialization <a id="over.match.list">[[over.match.list]]</a>
2
 
3
  When objects of non-aggregate class type `T` are list-initialized such
4
  that [[dcl.init.list]] specifies that overload resolution is performed
5
+ according to the rules in this subclause or when forming a
6
+ list-initialization sequence according to [[over.ics.list]], overload
7
+ resolution selects the constructor in two phases:
8
 
9
+ - If the initializer list is not empty or `T` has no default
10
+ constructor, overload resolution is first performed where the
11
+ candidate functions are the initializer-list constructors
12
+ [[dcl.init.list]] of the class `T` and the argument list consists of
13
+ the initializer list as a single argument.
14
+ - Otherwise, or if no viable initializer-list constructor is found,
15
+ overload resolution is performed again, where the candidate functions
16
+ are all the constructors of the class `T` and the argument list
17
+ consists of the elements of the initializer list.
18
 
19
+ In copy-list-initialization, if an explicit constructor is chosen, the
20
+ initialization is ill-formed.
 
21
 
22
+ [*Note 1*: This differs from other situations ([[over.match.ctor]],
23
  [[over.match.copy]]), where only converting constructors are considered
24
  for copy-initialization. This restriction only applies if this
25
  initialization is part of the final result of overload
26
  resolution. — *end note*]
27