http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57575

Anass Lasram <anass.lasram at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Anass Lasram <anass.lasram at gmail dot com> ---
(In reply to Daniel Krügler from comment #1)
> Your assumptions are mistaken. In C++ it is valid to bind a function value
> to an rvalue reference of that function type. It is only so, that binding to
> an lvalue reference is preferred.
> 
> In other words, the following is valid as well:
> 
> float f() { return 0.f; }
> float (&&r)(void) = f;
> 
> See for example [over.ics.ref] p3 (emphasis mine):
> 
> "Except for an implicit object parameter, for which see 13.3.1, a standard
> conversion sequence cannot be formed if it requires [..] binding an rvalue
> reference to an lvalue **other than a function lvalue**."


Thanks Daniel for the rectification.

Reply via email to