]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cp/ChangeLog
PR c++/88875 - error with explicit list constructor.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Jan 2019 20:35:57 +0000 (20:35 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Jan 2019 20:35:57 +0000 (20:35 +0000)
commitecd2d842658a571162c3d464fb8954733cf1e3e6
tree01b860565979a75d1659e1bb91a2eccf062a56f8
parent31975c5ea11cee1a66a59e6d941db4c6b3cc602c
PR c++/88875 - error with explicit list constructor.

In my patch for CWG issue 2267, I changed reference_binding to clear
CONSTRUCTOR_IS_DIRECT_INIT on the argument init-list.  But that breaks if
there's another candidate for which CONSTRUCTOR_IS_DIRECT_INIT is correct.
So instead, let's encode in the conversion that we want to override the
flag.

* call.c (reference_binding): Don't modify EXPR.  Set
need_temporary_p on the ck_user conversion for a temporary.
(convert_like_real): Check it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268085 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/testsuite/g++.dg/cpp0x/initlist-explicit2.C [new file with mode: 0644]