Why is pass by value and pass by rvalue overload c++ function call ambiguous?

徘徊边缘 提交于 2019-12-01 18:20:56

Binding to a reference is an "exact match", as is binding to a non-reference, so both overloads are equally good.

In Standardese, this is 13.3.3.1.4 ("Reference binding", [over.ics.ref]):

When a parameter of reference type binds directly (8.5.3) to an argument expression, the implicit conversion sequence is the identity conversion [...]

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!