This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/64892] [C++14] generic lambdas, decltype(auto), and rvalue references, oh my!


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64892

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-03-05
            Summary|C++1y: generic lambdas,     |[C++14] generic lambdas,
                   |decltype(auto), and rvalue  |decltype(auto), and rvalue
                   |references, oh my!          |references, oh my!
     Ever confirmed|0                           |1

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Harald van Dijk from comment #2)
> Reduced:
> 
>   int&& i = 0;
>   decltype(auto) j = i;
> 
> or
> 
>   decltype(auto) f(int&&r) { return r; }
> 
> should both give an error, and do with clang, but are silently accepted by
> gcc.

Confirmed. EDG rejects them both too.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]