diff options
author | Nathaniel Shead <nathanieloshead@gmail.com> | 2024-03-06 00:43:22 +1100 |
---|---|---|
committer | Nathaniel Shead <nathanieloshead@gmail.com> | 2024-03-06 20:48:38 +1100 |
commit | 49d83e963aa453600088380aebd507e172eb80ad (patch) | |
tree | c3e1eae3e6b1aa7ebfa45a6fe75b5269aed3280a /gcc/system.h | |
parent | 3a910114fdb2aa76495c4c748acf6b9c7fbecc89 (diff) | |
download | gcc-49d83e963aa453600088380aebd507e172eb80ad.zip gcc-49d83e963aa453600088380aebd507e172eb80ad.tar.gz gcc-49d83e963aa453600088380aebd507e172eb80ad.tar.bz2 |
c++: Fix template deduction for conversion operators with xobj parameters [PR113629]
Unification for conversion operators (DEDUCE_CONV) doesn't perform
transformations like handling forwarding references. This is correct in
general, but not for xobj parameters, which should be handled "normally"
for the purposes of deduction: [temp.deduct.conv] only applies to the
return type of the conversion function.
PR c++/113629
gcc/cp/ChangeLog:
* pt.cc (type_unification_real): Only use DEDUCE_CONV for the
return type of a conversion function.
gcc/testsuite/ChangeLog:
* g++.dg/cpp23/explicit-obj-conv-op.C: New test.
Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'gcc/system.h')
0 files changed, 0 insertions, 0 deletions