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

c++: implicit deduction guides, protected access

Jonathan raised this issue with CWG, and there seems to be general agreement
that a deduction guide generated from a constructor should have access to
the same names that the constructor has access to.  That seems to be as easy
as setting DECL_CONTEXT.

gcc/cp/ChangeLog:

	* pt.c (build_deduction_guide): Treat the implicit deduction guide
	as a member of the class.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp1z/class-deduction-access1.C: New test.
	* g++.dg/cpp1z/class-deduction-access2.C: New test.
parent adcb497b
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