Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
下面的代码合法吗?
std::string&& x = "hello world";
g++ 4.5.0 编译此代码没有任何问题。
目前在usenet上对此进行了讨论。请参阅8.5/3 中的 Rvalue 参考示例正确还是错误?.
这不合法。