{"action":"created","comment":{"url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/pulls/comments/34975463","id":34975463,"diff_hunk":"@@ -237,3 +292,12 @@ C++ 允许在函数的任何位置声明变量. 我们提倡在尽可能小的\n #. 尽量不用全局函数和全局变量, 考虑作用域和命名空间限制, 尽量单独形成编译单元;\r\n #. 多线程中的全局变量 (含静态成员变量) 不要使用 ``class`` 类型 (含 STL 容器), 避免不明确行为导致的 bug.\r\n #. 作用域的使用, 除了考虑名称污染, 可读性之外, 主要是为降低耦合, 提高编译/执行效率.\r\n+\r\n+\r\n+译者（acgtyrant）笔记\r\n+~~~~~~~~~~~~~~~~~~~~~~~~\r\n+\r\n+#. 注意「using 指示（using-directive）」和「using 声明（using-declaration）」的区别。\r\n+#. 匿名名字空间说白了就是文件作用域，就像 C static 声明的作用域一样，后者已经被 C++ 标准废除。\r","path":"google-cpp-styleguide/scoping.rst","position":198,"original_position":198,"commit_id":"b4fd3442b38edc115d3ea7e0d6a43cea2fe3f3b0","original_commit_id":"b4fd3442b38edc115d3ea7e0d6a43cea2fe3f3b0","user":{"login":"innocentim","id":1157432,"avatar_url":"https://avatars.githubusercontent.com/u/1157432?v=3","gravatar_id":"","url":"https://api.github.com/users/innocentim","html_url":"https://github.com/innocentim","followers_url":"https://api.github.com/users/innocentim/followers","following_url":"https://api.github.com/users/innocentim/following{/other_user}","gists_url":"https://api.github.com/users/innocentim/gists{/gist_id}","starred_url":"https://api.github.com/users/innocentim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/innocentim/subscriptions","organizations_url":"https://api.github.com/users/innocentim/orgs","repos_url":"https://api.github.com/users/innocentim/repos","events_url":"https://api.github.com/users/innocentim/events{/privacy}","received_events_url":"https://api.github.com/users/innocentim/received_events","type":"User","site_admin":false},"body":"出处？","created_at":"2015-07-20T08:28:24Z","updated_at":"2015-07-20T08:28:24Z","html_url":"https://github.com/acgtyrant/zh-google-styleguide/pull/1#discussion_r34975463","pull_request_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/pulls/comments/34975463"},"html":{"href":"https://github.com/acgtyrant/zh-google-styleguide/pull/1#discussion_r34975463"},"pull_request":{"href":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/pulls/1","id":40204150,"html_url":"https://github.com/acgtyrant/zh-google-styleguide/pull/1","diff_url":"https://github.com/acgtyrant/zh-google-styleguide/pull/1.diff","patch_url":"https://github.com/acgtyrant/zh-google-styleguide/pull/1.patch","issue_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/issues/1","number":1,"state":"open","locked":false,"title":"C++ 风格指南翻译","user":{"login":"acgtyrant","id":3921062,"avatar_url":"https://avatars.githubusercontent.com/u/3921062?v=3","gravatar_id":"","url":"https://api.github.com/users/acgtyrant","html_url":"https://github.com/acgtyrant","followers_url":"https://api.github.com/users/acgtyrant/followers","following_url":"https://api.github.com/users/acgtyrant/following{/other_user}","gists_url":"https://api.github.com/users/acgtyrant/gists{/gist_id}","starred_url":"https://api.github.com/users/acgtyrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acgtyrant/subscriptions","organizations_url":"https://api.github.com/users/acgtyrant/orgs","repos_url":"https://api.github.com/users/acgtyrant/repos","events_url":"https://api.github.com/users/acgtyrant/events{/privacy}","received_events_url":"https://api.github.com/users/acgtyrant/received_events","type":"User","site_admin":false},"body":"原版本是 3.133, 现更新到 4.45.","created_at":"2015-07-17T06:42:18Z","updated_at":"2015-07-20T08:28:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"594f1e810b3fdea945f5d5d6485f1b4b6c8fb405","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/pulls/1/commits","review_comments_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/pulls/1/comments","review_comment_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/pulls/comments{/number}","comments_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/issues/1/comments","statuses_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/statuses/b4fd3442b38edc115d3ea7e0d6a43cea2fe3f3b0","head":{"label":"acgtyrant:acgtyrant-cpp-translate","ref":"acgtyrant-cpp-translate","sha":"b4fd3442b38edc115d3ea7e0d6a43cea2fe3f3b0","user":{"login":"acgtyrant","id":3921062,"avatar_url":"https://avatars.githubusercontent.com/u/3921062?v=3","gravatar_id":"","url":"https://api.github.com/users/acgtyrant","html_url":"https://github.com/acgtyrant","followers_url":"https://api.github.com/users/acgtyrant/followers","following_url":"https://api.github.com/users/acgtyrant/following{/other_user}","gists_url":"https://api.github.com/users/acgtyrant/gists{/gist_id}","starred_url":"https://api.github.com/users/acgtyrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acgtyrant/subscriptions","organizations_url":"https://api.github.com/users/acgtyrant/orgs","repos_url":"https://api.github.com/users/acgtyrant/repos","events_url":"https://api.github.com/users/acgtyrant/events{/privacy}","received_events_url":"https://api.github.com/users/acgtyrant/received_events","type":"User","site_admin":false},"repo":{"id":39199679,"name":"zh-google-styleguide","full_name":"acgtyrant/zh-google-styleguide","owner":{"login":"acgtyrant","id":3921062,"avatar_url":"https://avatars.githubusercontent.com/u/3921062?v=3","gravatar_id":"","url":"https://api.github.com/users/acgtyrant","html_url":"https://github.com/acgtyrant","followers_url":"https://api.github.com/users/acgtyrant/followers","following_url":"https://api.github.com/users/acgtyrant/following{/other_user}","gists_url":"https://api.github.com/users/acgtyrant/gists{/gist_id}","starred_url":"https://api.github.com/users/acgtyrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acgtyrant/subscriptions","organizations_url":"https://api.github.com/users/acgtyrant/orgs","repos_url":"https://api.github.com/users/acgtyrant/repos","events_url":"https://api.github.com/users/acgtyrant/events{/privacy}","received_events_url":"https://api.github.com/users/acgtyrant/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/acgtyrant/zh-google-styleguide","description":"Google 开源项目风格指南 (中文版)","fork":true,"url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide","forks_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/forks","keys_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/teams","hooks_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/hooks","issue_events_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/issues/events{/number}","events_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/events","assignees_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/assignees{/user}","branches_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/branches{/branch}","tags_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/tags","blobs_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/git/refs{/sha}","trees_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/statuses/{sha}","languages_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/languages","stargazers_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/stargazers","contributors_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/contributors","subscribers_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/subscribers","subscription_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/subscription","commits_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/commits{/sha}","git_commits_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/git/commits{/sha}","comments_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/comments{/number}","issue_comment_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/issues/comments{/number}","contents_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/contents/{+path}","compare_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/merges","archive_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/downloads","issues_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/issues{/number}","pulls_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/pulls{/number}","milestones_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/milestones{/number}","notifications_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/labels{/name}","releases_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/releases{/id}","created_at":"2015-07-16T13:53:22Z","updated_at":"2015-07-16T13:53:22Z","pushed_at":"2015-07-20T07:26:37Z","git_url":"git://github.com/acgtyrant/zh-google-styleguide.git","ssh_url":"git@github.com:acgtyrant/zh-google-styleguide.git","clone_url":"https://github.com/acgtyrant/zh-google-styleguide.git","svn_url":"https://github.com/acgtyrant/zh-google-styleguide","homepage":"http://zh-google-styleguide.readthedocs.org/","size":305,"stargazers_count":0,"watchers_count":0,"language":"Makefile","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"acgtyrant:master","ref":"master","sha":"0725927eec598314c8f06bd246287679ba520626","user":{"login":"acgtyrant","id":3921062,"avatar_url":"https://avatars.githubusercontent.com/u/3921062?v=3","gravatar_id":"","url":"https://api.github.com/users/acgtyrant","html_url":"https://github.com/acgtyrant","followers_url":"https://api.github.com/users/acgtyrant/followers","following_url":"https://api.github.com/users/acgtyrant/following{/other_user}","gists_url":"https://api.github.com/users/acgtyrant/gists{/gist_id}","starred_url":"https://api.github.com/users/acgtyrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acgtyrant/subscriptions","organizations_url":"https://api.github.com/users/acgtyrant/orgs","repos_url":"https://api.github.com/users/acgtyrant/repos","events_url":"https://api.github.com/users/acgtyrant/events{/privacy}","received_events_url":"https://api.github.com/users/acgtyrant/received_events","type":"User","site_admin":false},"repo":{"id":39199679,"name":"zh-google-styleguide","full_name":"acgtyrant/zh-google-styleguide","owner":{"login":"acgtyrant","id":3921062,"avatar_url":"https://avatars.githubusercontent.com/u/3921062?v=3","gravatar_id":"","url":"https://api.github.com/users/acgtyrant","html_url":"https://github.com/acgtyrant","followers_url":"https://api.github.com/users/acgtyrant/followers","following_url":"https://api.github.com/users/acgtyrant/following{/other_user}","gists_url":"https://api.github.com/users/acgtyrant/gists{/gist_id}","starred_url":"https://api.github.com/users/acgtyrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acgtyrant/subscriptions","organizations_url":"https://api.github.com/users/acgtyrant/orgs","repos_url":"https://api.github.com/users/acgtyrant/repos","events_url":"https://api.github.com/users/acgtyrant/events{/privacy}","received_events_url":"https://api.github.com/users/acgtyrant/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/acgtyrant/zh-google-styleguide","description":"Google 开源项目风格指南 (中文版)","fork":true,"url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide","forks_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/forks","keys_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/teams","hooks_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/hooks","issue_events_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/issues/events{/number}","events_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/events","assignees_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/assignees{/user}","branches_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/branches{/branch}","tags_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/tags","blobs_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/git/refs{/sha}","trees_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/statuses/{sha}","languages_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/languages","stargazers_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/stargazers","contributors_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/contributors","subscribers_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/subscribers","subscription_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/subscription","commits_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/commits{/sha}","git_commits_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/git/commits{/sha}","comments_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/comments{/number}","issue_comment_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/issues/comments{/number}","contents_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/contents/{+path}","compare_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/merges","archive_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/downloads","issues_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/issues{/number}","pulls_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/pulls{/number}","milestones_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/milestones{/number}","notifications_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/labels{/name}","releases_url":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/releases{/id}","created_at":"2015-07-16T13:53:22Z","updated_at":"2015-07-16T13:53:22Z","pushed_at":"2015-07-20T07:26:37Z","git_url":"git://github.com/acgtyrant/zh-google-styleguide.git","ssh_url":"git@github.com:acgtyrant/zh-google-styleguide.git","clone_url":"https://github.com/acgtyrant/zh-google-styleguide.git","svn_url":"https://github.com/acgtyrant/zh-google-styleguide","homepage":"http://zh-google-styleguide.readthedocs.org/","size":305,"stargazers_count":0,"watchers_count":0,"language":"Makefile","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/pulls/1"},"html":{"href":"https://github.com/acgtyrant/zh-google-styleguide/pull/1"},"issue":{"href":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/issues/1"},"comments":{"href":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/acgtyrant/zh-google-styleguide/statuses/b4fd3442b38edc115d3ea7e0d6a43cea2fe3f3b0"}}}}