https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110102

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:35d2c40e4ac9ba57ae82e4722e557a2028d0cf13

commit r14-1658-g35d2c40e4ac9ba57ae82e4722e557a2028d0cf13
Author: Jason Merrill <ja...@redhat.com>
Date:   Thu Jun 8 16:21:38 2023 -0400

    c++: init-list of uncopyable type [PR110102]

    The maybe_init_list_as_range optimization is a form of copy elision, but we
    can only elide well-formed copies.

            PR c++/110102

    gcc/cp/ChangeLog:

            * call.cc (maybe_init_list_as_array): Check that the element type
is
            copyable.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/initlist-opt1.C: New test.

Reply via email to