Skip to content
Snippets Groups Projects
Commit 35d2c40e authored by Jason Merrill's avatar Jason Merrill
Browse files

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.
parent 0f8f1dee
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment