This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115d. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-10-26


1238. Overloading ambiguity binding reference to function

Section: 12.2.4.3  [over.ics.rank]     Status: C++11     Submitter: Doug Gregor     Date: 2011-01-25

[Voted into the WP at the March, 2011 meeting as part of paper N3262.]

Currently overload resolution does not distinguish between binding an lvalue reference to a function lvalue and an rvalue reference to a function lvalue. The former should be preferred.

In a related point, the current wording of 12.2.4.2.5 [over.ics.ref] paragraph 3 forbids binding an rvalue reference to an lvalue; this should be changed to allow binding an rvalue reference to a function lvalue.