{"action":"created","comment":{"url":"https://api.github.com/repos/Mooophy/Cpp-Primer/pulls/comments/34982006","id":34982006,"diff_hunk":"@@ -18,7 +18,14 @@\n \n class HasPtr {\n public:\n-    friend void swap(HasPtr&, HasPtr&);\n+    friend inline void swap(HasPtr& lhs, HasPtr& rhs)\n+    {\n+    using std::swap;\n+    swap(lhs.ps, rhs.ps);\n+    swap(lhs.i, rhs.i);\n+    std::cout << \"call swap(HasPtr& lhs, HasPtr& rhs)\" << std::endl;\n+    }\n+    \n     HasPtr(const std::string &s = std::string()) : ps(new std::string(s)), i(0) { }","path":"ch13/ex13_30.h","position":13,"original_position":13,"commit_id":"69077dd68ad95905fea406e958692105f3a28ba0","original_commit_id":"69077dd68ad95905fea406e958692105f3a28ba0","user":{"login":"pezy","id":1147451,"avatar_url":"https://avatars.githubusercontent.com/u/1147451?v=3","gravatar_id":"","url":"https://api.github.com/users/pezy","html_url":"https://github.com/pezy","followers_url":"https://api.github.com/users/pezy/followers","following_url":"https://api.github.com/users/pezy/following{/other_user}","gists_url":"https://api.github.com/users/pezy/gists{/gist_id}","starred_url":"https://api.github.com/users/pezy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pezy/subscriptions","organizations_url":"https://api.github.com/users/pezy/orgs","repos_url":"https://api.github.com/users/pezy/repos","events_url":"https://api.github.com/users/pezy/events{/privacy}","received_events_url":"https://api.github.com/users/pezy/received_events","type":"User","site_admin":false},"body":"@Soyn  Please keep the **indentation**, and the `inline` there is **redundant**.","created_at":"2015-07-20T10:15:29Z","updated_at":"2015-07-20T10:15:29Z","html_url":"https://github.com/Mooophy/Cpp-Primer/pull/300#discussion_r34982006","pull_request_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/pulls/300","_links":{"self":{"href":"https://api.github.com/repos/Mooophy/Cpp-Primer/pulls/comments/34982006"},"html":{"href":"https://github.com/Mooophy/Cpp-Primer/pull/300#discussion_r34982006"},"pull_request":{"href":"https://api.github.com/repos/Mooophy/Cpp-Primer/pulls/300"}}},"pull_request":{"url":"https://api.github.com/repos/Mooophy/Cpp-Primer/pulls/300","id":40327631,"html_url":"https://github.com/Mooophy/Cpp-Primer/pull/300","diff_url":"https://github.com/Mooophy/Cpp-Primer/pull/300.diff","patch_url":"https://github.com/Mooophy/Cpp-Primer/pull/300.patch","issue_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/issues/300","number":300,"state":"open","locked":false,"title":"fix","user":{"login":"Soyn","id":7734046,"avatar_url":"https://avatars.githubusercontent.com/u/7734046?v=3","gravatar_id":"","url":"https://api.github.com/users/Soyn","html_url":"https://github.com/Soyn","followers_url":"https://api.github.com/users/Soyn/followers","following_url":"https://api.github.com/users/Soyn/following{/other_user}","gists_url":"https://api.github.com/users/Soyn/gists{/gist_id}","starred_url":"https://api.github.com/users/Soyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Soyn/subscriptions","organizations_url":"https://api.github.com/users/Soyn/orgs","repos_url":"https://api.github.com/users/Soyn/repos","events_url":"https://api.github.com/users/Soyn/events{/privacy}","received_events_url":"https://api.github.com/users/Soyn/received_events","type":"User","site_admin":false},"body":"I think there is not necessary to assign the nullptr. We will assign the `rhs.value` to the left,right and count.","created_at":"2015-07-20T07:14:30Z","updated_at":"2015-07-20T10:15:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"534b324c1bc5c771fafe1c24055e15554ce584ac","assignee":{"login":"pezy","id":1147451,"avatar_url":"https://avatars.githubusercontent.com/u/1147451?v=3","gravatar_id":"","url":"https://api.github.com/users/pezy","html_url":"https://github.com/pezy","followers_url":"https://api.github.com/users/pezy/followers","following_url":"https://api.github.com/users/pezy/following{/other_user}","gists_url":"https://api.github.com/users/pezy/gists{/gist_id}","starred_url":"https://api.github.com/users/pezy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pezy/subscriptions","organizations_url":"https://api.github.com/users/pezy/orgs","repos_url":"https://api.github.com/users/pezy/repos","events_url":"https://api.github.com/users/pezy/events{/privacy}","received_events_url":"https://api.github.com/users/pezy/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/pulls/300/commits","review_comments_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/pulls/300/comments","review_comment_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/issues/300/comments","statuses_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/statuses/69077dd68ad95905fea406e958692105f3a28ba0","head":{"label":"Soyn:master","ref":"master","sha":"69077dd68ad95905fea406e958692105f3a28ba0","user":{"login":"Soyn","id":7734046,"avatar_url":"https://avatars.githubusercontent.com/u/7734046?v=3","gravatar_id":"","url":"https://api.github.com/users/Soyn","html_url":"https://github.com/Soyn","followers_url":"https://api.github.com/users/Soyn/followers","following_url":"https://api.github.com/users/Soyn/following{/other_user}","gists_url":"https://api.github.com/users/Soyn/gists{/gist_id}","starred_url":"https://api.github.com/users/Soyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Soyn/subscriptions","organizations_url":"https://api.github.com/users/Soyn/orgs","repos_url":"https://api.github.com/users/Soyn/repos","events_url":"https://api.github.com/users/Soyn/events{/privacy}","received_events_url":"https://api.github.com/users/Soyn/received_events","type":"User","site_admin":false},"repo":{"id":38685039,"name":"Cpp-Primer","full_name":"Soyn/Cpp-Primer","owner":{"login":"Soyn","id":7734046,"avatar_url":"https://avatars.githubusercontent.com/u/7734046?v=3","gravatar_id":"","url":"https://api.github.com/users/Soyn","html_url":"https://github.com/Soyn","followers_url":"https://api.github.com/users/Soyn/followers","following_url":"https://api.github.com/users/Soyn/following{/other_user}","gists_url":"https://api.github.com/users/Soyn/gists{/gist_id}","starred_url":"https://api.github.com/users/Soyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Soyn/subscriptions","organizations_url":"https://api.github.com/users/Soyn/orgs","repos_url":"https://api.github.com/users/Soyn/repos","events_url":"https://api.github.com/users/Soyn/events{/privacy}","received_events_url":"https://api.github.com/users/Soyn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Soyn/Cpp-Primer","description":"C++ Primer 5ed answers","fork":true,"url":"https://api.github.com/repos/Soyn/Cpp-Primer","forks_url":"https://api.github.com/repos/Soyn/Cpp-Primer/forks","keys_url":"https://api.github.com/repos/Soyn/Cpp-Primer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Soyn/Cpp-Primer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Soyn/Cpp-Primer/teams","hooks_url":"https://api.github.com/repos/Soyn/Cpp-Primer/hooks","issue_events_url":"https://api.github.com/repos/Soyn/Cpp-Primer/issues/events{/number}","events_url":"https://api.github.com/repos/Soyn/Cpp-Primer/events","assignees_url":"https://api.github.com/repos/Soyn/Cpp-Primer/assignees{/user}","branches_url":"https://api.github.com/repos/Soyn/Cpp-Primer/branches{/branch}","tags_url":"https://api.github.com/repos/Soyn/Cpp-Primer/tags","blobs_url":"https://api.github.com/repos/Soyn/Cpp-Primer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Soyn/Cpp-Primer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Soyn/Cpp-Primer/git/refs{/sha}","trees_url":"https://api.github.com/repos/Soyn/Cpp-Primer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Soyn/Cpp-Primer/statuses/{sha}","languages_url":"https://api.github.com/repos/Soyn/Cpp-Primer/languages","stargazers_url":"https://api.github.com/repos/Soyn/Cpp-Primer/stargazers","contributors_url":"https://api.github.com/repos/Soyn/Cpp-Primer/contributors","subscribers_url":"https://api.github.com/repos/Soyn/Cpp-Primer/subscribers","subscription_url":"https://api.github.com/repos/Soyn/Cpp-Primer/subscription","commits_url":"https://api.github.com/repos/Soyn/Cpp-Primer/commits{/sha}","git_commits_url":"https://api.github.com/repos/Soyn/Cpp-Primer/git/commits{/sha}","comments_url":"https://api.github.com/repos/Soyn/Cpp-Primer/comments{/number}","issue_comment_url":"https://api.github.com/repos/Soyn/Cpp-Primer/issues/comments{/number}","contents_url":"https://api.github.com/repos/Soyn/Cpp-Primer/contents/{+path}","compare_url":"https://api.github.com/repos/Soyn/Cpp-Primer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Soyn/Cpp-Primer/merges","archive_url":"https://api.github.com/repos/Soyn/Cpp-Primer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Soyn/Cpp-Primer/downloads","issues_url":"https://api.github.com/repos/Soyn/Cpp-Primer/issues{/number}","pulls_url":"https://api.github.com/repos/Soyn/Cpp-Primer/pulls{/number}","milestones_url":"https://api.github.com/repos/Soyn/Cpp-Primer/milestones{/number}","notifications_url":"https://api.github.com/repos/Soyn/Cpp-Primer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Soyn/Cpp-Primer/labels{/name}","releases_url":"https://api.github.com/repos/Soyn/Cpp-Primer/releases{/id}","created_at":"2015-07-07T12:05:24Z","updated_at":"2015-07-07T12:05:25Z","pushed_at":"2015-07-20T09:26:21Z","git_url":"git://github.com/Soyn/Cpp-Primer.git","ssh_url":"git@github.com:Soyn/Cpp-Primer.git","clone_url":"https://github.com/Soyn/Cpp-Primer.git","svn_url":"https://github.com/Soyn/Cpp-Primer","homepage":"","size":1293,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Mooophy:master","ref":"master","sha":"c9837426ea73f68b729e704db34b9204c42c6055","user":{"login":"Mooophy","id":5942966,"avatar_url":"https://avatars.githubusercontent.com/u/5942966?v=3","gravatar_id":"","url":"https://api.github.com/users/Mooophy","html_url":"https://github.com/Mooophy","followers_url":"https://api.github.com/users/Mooophy/followers","following_url":"https://api.github.com/users/Mooophy/following{/other_user}","gists_url":"https://api.github.com/users/Mooophy/gists{/gist_id}","starred_url":"https://api.github.com/users/Mooophy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mooophy/subscriptions","organizations_url":"https://api.github.com/users/Mooophy/orgs","repos_url":"https://api.github.com/users/Mooophy/repos","events_url":"https://api.github.com/users/Mooophy/events{/privacy}","received_events_url":"https://api.github.com/users/Mooophy/received_events","type":"User","site_admin":false},"repo":{"id":19614405,"name":"Cpp-Primer","full_name":"Mooophy/Cpp-Primer","owner":{"login":"Mooophy","id":5942966,"avatar_url":"https://avatars.githubusercontent.com/u/5942966?v=3","gravatar_id":"","url":"https://api.github.com/users/Mooophy","html_url":"https://github.com/Mooophy","followers_url":"https://api.github.com/users/Mooophy/followers","following_url":"https://api.github.com/users/Mooophy/following{/other_user}","gists_url":"https://api.github.com/users/Mooophy/gists{/gist_id}","starred_url":"https://api.github.com/users/Mooophy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mooophy/subscriptions","organizations_url":"https://api.github.com/users/Mooophy/orgs","repos_url":"https://api.github.com/users/Mooophy/repos","events_url":"https://api.github.com/users/Mooophy/events{/privacy}","received_events_url":"https://api.github.com/users/Mooophy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Mooophy/Cpp-Primer","description":"C++ Primer 5ed answers","fork":false,"url":"https://api.github.com/repos/Mooophy/Cpp-Primer","forks_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/forks","keys_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/teams","hooks_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/hooks","issue_events_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/issues/events{/number}","events_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/events","assignees_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/assignees{/user}","branches_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/branches{/branch}","tags_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/tags","blobs_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/statuses/{sha}","languages_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/languages","stargazers_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/stargazers","contributors_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/contributors","subscribers_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/subscribers","subscription_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/subscription","commits_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/contents/{+path}","compare_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/merges","archive_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/downloads","issues_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/issues{/number}","pulls_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/pulls{/number}","milestones_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/milestones{/number}","notifications_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/labels{/name}","releases_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/releases{/id}","created_at":"2014-05-09T14:43:33Z","updated_at":"2015-07-20T06:48:59Z","pushed_at":"2015-07-20T09:26:22Z","git_url":"git://github.com/Mooophy/Cpp-Primer.git","ssh_url":"git@github.com:Mooophy/Cpp-Primer.git","clone_url":"https://github.com/Mooophy/Cpp-Primer.git","svn_url":"https://github.com/Mooophy/Cpp-Primer","homepage":"","size":3215,"stargazers_count":538,"watchers_count":538,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":563,"mirror_url":null,"open_issues_count":1,"forks":563,"open_issues":1,"watchers":538,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Mooophy/Cpp-Primer/pulls/300"},"html":{"href":"https://github.com/Mooophy/Cpp-Primer/pull/300"},"issue":{"href":"https://api.github.com/repos/Mooophy/Cpp-Primer/issues/300"},"comments":{"href":"https://api.github.com/repos/Mooophy/Cpp-Primer/issues/300/comments"},"review_comments":{"href":"https://api.github.com/repos/Mooophy/Cpp-Primer/pulls/300/comments"},"review_comment":{"href":"https://api.github.com/repos/Mooophy/Cpp-Primer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Mooophy/Cpp-Primer/pulls/300/commits"},"statuses":{"href":"https://api.github.com/repos/Mooophy/Cpp-Primer/statuses/69077dd68ad95905fea406e958692105f3a28ba0"}}}}