Do rvalue links allow implicit conversions?

Is the following code legal?

std::string&& x = "hello world"; 

g ++ 4.5.0 compiles this code without problems.

+6
c ++ type-conversion c ++ 11 rvalue-reference temporary
source share
1 answer

This is being discussed at usenet currently. See the Rvalue reference example in 8.5 / 3 right or wrong? .

This is not legal.

+5
source share

All Articles