https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79504
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Mix of perfect forwarding |Overload resolution in |and reference qualifier |trailing-return-type |leads to recursive template |ignores reference qualifier |instantiation. |and leads to recursive | |template instantiation. --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Tweaking the testcase confirms that the call in the function body correctly resolves to void A::f()& but the one in the trailing-return-type doesn't seem to consider the ref-qualifier, and incorrectly calls itself. Summary adjusted accordingly.