gcc/libstdc++-v3
Patrick Palka 7da4eae3dc c++: excessive instantiation during CTAD [PR101174]
We set DECL_CONTEXT on implicitly generated deduction guides so that
their access is consistent with that of the constructor.  But this
apparently leads to excessive instantiation in some cases, ultimately
because instantiation of a deduction guide should be independent of
instantiation of the resulting class specialization, but setting the
DECL_CONTEXT of the former to the latter breaks this independence.

To fix this, this patch makes push_access_scope handle artificial
deduction guides specifically rather than setting their DECL_CONTEXT
in build_deduction_guide.  We could alternatively make the class
befriend the guide via DECL_BEFRIENDING_CLASSES, but that wouldn't
be a complete fix and would break class-deduction-access3.C below
since friendship isn't transitive.

	PR c++/101174

gcc/cp/ChangeLog:

	* pt.c (push_access_scope): For artificial deduction guides,
	set the access scope to that of the constructor.
	(pop_access_scope): Likewise.
	(build_deduction_guide): Don't set DECL_CONTEXT on the guide.

libstdc++-v3/ChangeLog:

	* testsuite/23_containers/multiset/cons/deduction.cc:
	Uncomment CTAD example that was rejected by this bug.
	* testsuite/23_containers/set/cons/deduction.cc: Likewise.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp1z/class-deduction-access3.C: New test.
	* g++.dg/cpp1z/class-deduction91.C: New test.
2021-06-23 17:23:39 -04:00
..
config ctype support for libstdc++ on VxWorks 2021-05-04 21:49:43 -03:00
doc libstdc++: Add feature test macro for heterogeneous lookup in unordered containers 2021-06-04 15:59:37 +01:00
include libstdc++: Fix comment in chrono::year::is_leap() 2021-06-23 18:50:03 +01:00
libsupc++ libstdc++: Implement LWG 3465 for std::compare_partial_order_fallback [PR101056] 2021-06-14 14:04:45 +01:00
po Update copyright years. 2021-01-04 10:26:59 +01:00
python libstdc++: Fix installation of python hooks [PR 99453] 2021-06-01 13:29:34 +01:00
scripts libstdc++: Allow lualatex to be used for Doxygen PDF 2021-05-17 12:13:41 +01:00
src libstdc++: [_GLIBCXX_DEBUG] Enhance rendering of assert message 2021-05-26 21:50:17 +02:00
testsuite c++: excessive instantiation during CTAD [PR101174] 2021-06-23 17:23:39 -04:00
ChangeLog Daily bump. 2021-06-23 00:16:28 +00:00
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017
ChangeLog-2018
ChangeLog-2019 libstdc++: Fix whitespace in ChangeLog-2019 2020-01-09 21:31:35 +00:00
ChangeLog-2020 libstdc++: Fix typo in ChangeLog-2020 2021-01-13 11:02:13 +00:00
Makefile.am Update copyright years. 2021-01-04 10:26:59 +01:00
Makefile.in libstdc++: Add C++ runtime support for new 128-bit long double format 2020-12-16 23:25:01 +00:00
README
acinclude.m4 ctype support for libstdc++ on VxWorks 2021-05-04 21:49:43 -03:00
aclocal.m4 Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
config.h.in libstdc++: Remove _GLIBCXX_USE_INT128 autoconf macro 2021-05-04 12:07:09 +01:00
configure ctype support for libstdc++ on VxWorks 2021-05-04 21:49:43 -03:00
configure.ac libstdc++: Remove _GLIBCXX_USE_INT128 autoconf macro 2021-05-04 12:07:09 +01:00
configure.host Scope libstdc++ configuration for vxworks to all versions 2020-10-22 16:40:57 +00:00
crossconfig.m4 Scope libstdc++ configuration for vxworks to all versions 2020-10-22 16:40:57 +00:00
fragment.am libstdc++: Add C++ runtime support for new 128-bit long double format 2020-12-16 23:25:01 +00:00
linkage.m4

README

file: libstdc++-v3/README

New users may wish to point their web browsers to the file
index.html in the 'doc/html' subdirectory.  It contains brief
building instructions and notes on how to configure the library in
interesting ways.