Skip to content
Snippets Groups Projects
Commit 2ab5c3d5 authored by Patrick Palka's avatar Patrick Palka
Browse files

c++: default ctor that's also a list ctor [PR102050]

In grok_special_member_properties we need to set TYPE_HAS_COPY_CTOR,
TYPE_HAS_DEFAULT_CONSTRUCTOR and TYPE_HAS_LIST_CTOR independently
from each other because a constructor can be both a default and list
constructor (as in the first testcase), or both a default and copy
constructor (as in the second testcase).

	PR c++/102050

gcc/cp/ChangeLog:

	* decl.c (grok_special_member_properties): Set
	TYPE_HAS_COPY_CTOR, TYPE_HAS_DEFAULT_CONSTRUCTOR
	and TYPE_HAS_LIST_CTOR independently from each other.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp0x/initlist125.C: New test.
	* g++.dg/cpp0x/initlist126.C: New test.
parent 2709337c
No related branches found
No related tags found
No related merge requests found
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