The High Integrity C++ Standards suggest that rvalue arguments to functions can be deleted thus preventing implicit conversions.
http://www.codingstandard.com/rule/8-3-4
The High Integrity C++ Standards suggest that rvalue arguments to functions can be deleted thus preventing implicit conversions.
No, only a forwarding reference overload disables ICS (Implicit Conversion Sequence) for all other overloads in the overload set. Make it a forwarding reference, and see ICS disabled (Coliru Link)
template
void foo(const T&&) = delete; // introduces a qualification match
The above code adds a qualification match to the overload. Thus, ICS is still in play.
Why foo(3.3)
failed is because 3.3
is an prvalue of type double
which will match better with the rvalue overload than converting to int
. Because qualification match is ranked better than a conversion match