Skip to content

Commit e222338

Browse files
committed
CWG2856 Copy-list-initialization with explicit default constructors
1 parent a6e579f commit e222338

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

source/overloading.tex

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,17 +1001,18 @@
10011001
or default-initialized\iref{dcl.init},
10021002
overload resolution selects the constructor.
10031003
For direct-initialization or default-initialization
1004-
that is not in the context of copy-initialization, the
1005-
candidate functions are
1004+
(including default-initialization in the context of copy-list-initialization),
1005+
the candidate functions are
10061006
all the constructors of the class of the object being
10071007
initialized.
1008-
For copy-initialization (including default initialization
1009-
in the context of copy-initialization), the candidate functions are all
1008+
Otherwise, the candidate functions are all
10101009
the converting constructors\iref{class.conv.ctor} of that
10111010
class.
10121011
The argument list is the
10131012
\grammarterm{expression-list} or \grammarterm{assignment-expression}
10141013
of the \grammarterm{initializer}.
1014+
For default-initialization in the context of copy-list-initialization,
1015+
if an explicit constructor is chosen, the initialization is ill-formed.
10151016

10161017
\rSec3[over.match.copy]{Copy-initialization of class by user-defined conversion}%
10171018
\indextext{overloading!resolution!initialization}

0 commit comments

Comments
 (0)