mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
In C++ overload resolution, when mapping a Carbon value expression into a C++ argument, produce a const-qualified argument where possible. This has two effects: * Overload resolution does not consider non-const-qualified member functions to be viable for a prvalue self any more. This is desirable since such functions are not actually callable with a prvalue self, and permits overload resolution to pick a const-qualified overload instead. * Overload resolution does not allow a Carbon value expression to be passed to a C++ `T&&` parameter any more. This is desirable since it's not correct to move from a value expression. Previously we allowed this and moved from the value!