This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/60027] Problem with braced-init-lists and explicit ctors
- From: "ed at catmur dot co.uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 04 May 2016 14:13:53 +0000
- Subject: [Bug c++/60027] Problem with braced-init-lists and explicit ctors
- Auto-submitted: auto-generated
- References: <bug-60027-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60027
Ed Catmur <ed at catmur dot co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ed at catmur dot co.uk
--- Comment #1 from Ed Catmur <ed at catmur dot co.uk> ---
This is correct.
[over.match.list]:
[...] In copy-list-initialization, if an explicit constructor is chosen, the
initialization is ill-formed. [ Note: This differs from other situations
([over.match.ctor], [over.match.copy]), where only converting constructors are
considered for copy-initialization. This restriction only applies if this
initialization is part of the final result of overload resolution. â end note ]
See also: https://llvm.org/bugs/show_bug.cgi?id=27642
http://stackoverflow.com/questions/34622076/calling-an-explicit-constructor-with-a-braced-init-list-ambiguous-or-not?rq=1