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: unassig...@gcc.gnu.org ReportedBy: leo...@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 } ---------------------------------------------