Go to file
Patrick Palka ee3efe06c9 c++: CWG 2789 and usings [PR116492]
After CWG 2789, the "more constrained" tiebreaker for non-template
functions should exclude member functions that are defined in
different classes.  This patch implements this missing refinement.

In turn we can get rid of four-parameter version of object_parms_correspond
and call the main overload directly since now correspondence is only
only checked for members from the same class.

	PR c++/116492
	DR 2789

gcc/cp/ChangeLog:

	* call.cc (object_parms_correspond): Remove.
	(cand_parms_match): Return false for member functions that come
	from different classes.  Adjust call to object_parms_correspond.
	(joust): Update comment for the non-template "more constrained"
	case.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp2a/concepts-memfun4.C: Also compile in C++20 mode.
	Expect ambiguity when candidates come from different classes.
	* g++.dg/cpp2a/concepts-inherit-ctor12.C: New test.

Reviewed-by: Jason Merrill <jason@redhat.com>
2024-09-20 12:33:13 -04:00
.github
c++tools
config
contrib
fixincludes
gcc c++: CWG 2789 and usings [PR116492] 2024-09-20 12:33:13 -04:00
gnattools
gotools
include OpenMP: Add get_device_from_uid/omp_get_uid_from_device routines 2024-09-20 09:25:33 +02:00
INSTALL
libada
libatomic
libbacktrace
libcc1
libcody
libcpp Update cpplib zh_CN.po 2024-09-19 21:09:21 +00:00
libdecnumber
libffi
libgcc
libgfortran
libgm2
libgo
libgomp OpenMP: Add get_device_from_uid/omp_get_uid_from_device routines 2024-09-20 09:25:33 +02:00
libgrust
libiberty
libitm
libobjc
libphobos
libquadmath
libsanitizer
libssp
libstdc++-v3 libstdc++: add #pragma diagnostic 2024-09-19 10:23:16 -04:00
libvtv
lto-plugin
maintainer-scripts
zlib
.b4-config
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
SECURITY.txt
symlink-tree
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.