[Bug c++/54425] New: Rvalue/Lvalue overload resolution of templated function
leonid at volnitsky dot com
gcc-bugzilla@gcc.gnu.org
Thu Aug 30 17:19:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54425
Bug #: 54425
Summary: Rvalue/Lvalue overload resolution of templated
function
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: leonid@volnitsky.com
Code below is rejected by 4.8.0. FWIW - it is accepted by clang32 and latest
VC.
-------------------------------------------------
template<class T> void f(T& t) {};
template<class T> void f(T&& t) {};
int main() {
int lv{11};
f(lv); // error: ambigues overload
}
---------------------------------------------
More information about the Gcc-bugs
mailing list