Is the following code legal?
std::string&& x = "hello world";
g ++ 4.5.0 compiles this code without problems.
This is being discussed at usenet currently. See the Rvalue reference example in 8.5 / 3 right or wrong? .
This is not legal.