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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Starting GCC 4.5.x we get the following error message first:
<source>: In function 'typename std::remove_reference<_Tp>::type&&
std0x::move(T&&) [with T = int&, typename std::remove_reference<_Tp>::type =
int]':
<source>:36:22:   instantiated from 'void std0x::swap(T&, T&) [with T = int]'
<source>:174:23:   instantiated from here
<source>:30:36: error: invalid initialization of reference of type
'std::remove_reference<int&>::type&&' from expression of type 'int'


Note clang also gets that error message.

I have no idea if this is valid code or not.

Reply via email to