N3055 briefly addresses the issue of rvalue function references:
In addition, rvalue links (for example, traditional lvalue links) can be associated with functions. Considering the rvalue reference return value as an rvalue, however, introduces a new concept of the rvalue function into the language. There was no such idea before - the lvalue function used in the rvalue context becomes the r-value for the function pointer, and not the rvalue function - therefore, the current draft of the standard does not describe how such values should be processed. In particular, function calls and conversions for working with pointers are specified in terms of lvalues functions, so the most likely use of rvalue references for undefined functions is in the current edition.
Functions do not have a lifespan or storage, so the distinction lvalue / rvalue does not make sense to them. On the other hand, if you allow the rvalues functions to exist, you need to solve the problems discussed in this paragraph. In light of this, the forced value of all function values for lvalues seems to me a reasonable solution.
Another solution, I believe, would be to completely prohibit rvalues, so any attempt to create an rvalue reference for a function type will result in a poorly formed program. I do not know if this approach has been considered, but I assume that this will cause inconvenience with general programming.
On the other hand, for any type of object, including array types, there is a significant difference between lvalues and rvalues. Therefore, the language forbids you to bind an rvalue reference to an object type to an lvalue of an object type. I'm not sure why you are surprised that your code does not compile.
Brian
source share