[Bug c++/79504] Overload resolution in trailing-return-type ignores reference qualifier and leads to recursive template instantiation.

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Feb 14 11:07:00 GMT 2017


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.


More information about the Gcc-bugs mailing list