{"action":"closed","issue":{"url":"https://api.github.com/repos/ReadingLab/Discussion-for-Cpp/issues/56","repository_url":"https://api.github.com/repos/ReadingLab/Discussion-for-Cpp","labels_url":"https://api.github.com/repos/ReadingLab/Discussion-for-Cpp/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/ReadingLab/Discussion-for-Cpp/issues/56/comments","events_url":"https://api.github.com/repos/ReadingLab/Discussion-for-Cpp/issues/56/events","html_url":"https://github.com/ReadingLab/Discussion-for-Cpp/issues/56","id":138743116,"number":56,"title":"关于右值引用的问题","user":{"login":"Nwpuer","id":12567703,"avatar_url":"https://avatars.githubusercontent.com/u/12567703?v=3","gravatar_id":"","url":"https://api.github.com/users/Nwpuer","html_url":"https://github.com/Nwpuer","followers_url":"https://api.github.com/users/Nwpuer/followers","following_url":"https://api.github.com/users/Nwpuer/following{/other_user}","gists_url":"https://api.github.com/users/Nwpuer/gists{/gist_id}","starred_url":"https://api.github.com/users/Nwpuer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nwpuer/subscriptions","organizations_url":"https://api.github.com/users/Nwpuer/orgs","repos_url":"https://api.github.com/users/Nwpuer/repos","events_url":"https://api.github.com/users/Nwpuer/events{/privacy}","received_events_url":"https://api.github.com/users/Nwpuer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ReadingLab/Discussion-for-Cpp/labels/*value","name":"*value","color":"fad8c7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-06T01:46:10Z","updated_at":"2016-03-07T07:03:32Z","closed_at":"2016-03-07T07:03:32Z","body":"在C++ Primer第13章中，有这样一个函数：\r\n`void StrVec::push_back(string &&s)\r\n{chk_n_alloc();\r\nalloc.construct(first_free++,std::move(s));`\r\n我有这样的疑惑：为什么s本身已经是右值了，还需要用move函数呢？\r\n后来看到第15章时，看到一个类似的函数，它是这样解释的：尽管s的类型是右值引用类型，但实际上s本身（和任何其他变量一样）是个左值。\r\n这让我不能理解，为什么s是个右值引用类型的同时还能是左值呢？引用类型难道不仅仅是一个别名吗？\r\n"}}