{"action":"created","comment":{"url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments/57509516","id":57509516,"diff_hunk":"@@ -211,6 +211,62 @@ a += \"b\"\n   + \"d\";\n ```\n \n+* Initializers\n+\n+We allow brace enclosed initializers only for aggregates and arrays/containers.<br />\n+Brace enclosed initializer MUST be used with equality sign if it follow the variable declaration.<br />\n+Brace enclosed initializer MUST be additionally enclosed in parentheses if it used in constructor initialization list.<br />\n+Some valid use cases:\n+```c++\n+// aggregate\n+Person john = { \"John\", \"Smith\", 21 };\n+Person *john = new Person { \"John\", \"Smith\", 21 };\n+\n+// array\n+int array[] = { 1, 2, 3, 4 };\n+\n+// container\n+QHash<QString, QString> map = {\n+    { \"key1\", \"value1\" },\n+    { \"key2\", \"value2\" }\n+);\n+\n+// member array\n+SomeClass::SomeClass(BaseClass *parent)\n+    : BaseClass(parent)\n+    , m_someArrayMember({ 1, 2, 3, 4 })\n+{\n+}\n+\n+// return from function\n+Person getPersonByName(const QString &name)\n+{\n+    // do something\n+    return { name, surname, age };\n+}\n+\n+// function argument\n+doSomething({ name, surname, age }, someOtherArg);\n+```\n+\n+* **auto** keyword\n+\n+We allow to use the **auto** keyword only where it doesn't break the readability of the code (i.e. either we can gather enough information about the type from the right part of the expression, or we do not need to know the exact type), or where it is strictly necessary (for example, to compute the type of a lambda, etc.).<br />\n+Some valid use cases:\n+```c++\n+foreach (auto item, container) {","path":"CODING_GUIDELINES.md","position":null,"original_position":47,"commit_id":"645c3bf69f32fe91ef6d9159441c0f7ce61a3d23","original_commit_id":"ae5737766fce6b97e4c123b5342f14cd5793ef6b","user":{"login":"glassez","id":5063477,"avatar_url":"https://avatars.githubusercontent.com/u/5063477?v=3","gravatar_id":"","url":"https://api.github.com/users/glassez","html_url":"https://github.com/glassez","followers_url":"https://api.github.com/users/glassez/followers","following_url":"https://api.github.com/users/glassez/following{/other_user}","gists_url":"https://api.github.com/users/glassez/gists{/gist_id}","starred_url":"https://api.github.com/users/glassez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glassez/subscriptions","organizations_url":"https://api.github.com/users/glassez/orgs","repos_url":"https://api.github.com/users/glassez/repos","events_url":"https://api.github.com/users/glassez/events{/privacy}","received_events_url":"https://api.github.com/users/glassez/received_events","type":"User","site_admin":false},"body":"I replaced it with some more suitable example.","created_at":"2016-03-26T05:14:59Z","updated_at":"2016-03-26T05:14:59Z","html_url":"https://github.com/qbittorrent/qBittorrent/pull/4961#discussion_r57509516","pull_request_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/4961","_links":{"self":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments/57509516"},"html":{"href":"https://github.com/qbittorrent/qBittorrent/pull/4961#discussion_r57509516"},"pull_request":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/4961"}}},"pull_request":{"url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/4961","id":62947041,"html_url":"https://github.com/qbittorrent/qBittorrent/pull/4961","diff_url":"https://github.com/qbittorrent/qBittorrent/pull/4961.diff","patch_url":"https://github.com/qbittorrent/qBittorrent/pull/4961.patch","issue_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/4961","number":4961,"state":"open","locked":false,"title":"Add new Coding Style rules for some c++11 features","user":{"login":"glassez","id":5063477,"avatar_url":"https://avatars.githubusercontent.com/u/5063477?v=3","gravatar_id":"","url":"https://api.github.com/users/glassez","html_url":"https://github.com/glassez","followers_url":"https://api.github.com/users/glassez/followers","following_url":"https://api.github.com/users/glassez/following{/other_user}","gists_url":"https://api.github.com/users/glassez/gists{/gist_id}","starred_url":"https://api.github.com/users/glassez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glassez/subscriptions","organizations_url":"https://api.github.com/users/glassez/orgs","repos_url":"https://api.github.com/users/glassez/repos","events_url":"https://api.github.com/users/glassez/events{/privacy}","received_events_url":"https://api.github.com/users/glassez/received_events","type":"User","site_admin":false},"body":"C++11 brings some features that allow you to write the same thing in different ways. Mixing these methods reduces code readability, so we need to regulate it.","created_at":"2016-03-15T17:39:29Z","updated_at":"2016-03-26T05:14:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d2631c2521a19bb2a8ed3c5f015e4f3c22204b2b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/4961/commits","review_comments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/4961/comments","review_comment_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/4961/comments","statuses_url":"https://api.github.com/repos/qbittorrent/qBittorrent/statuses/645c3bf69f32fe91ef6d9159441c0f7ce61a3d23","head":{"label":"glassez:codingstyle","ref":"codingstyle","sha":"645c3bf69f32fe91ef6d9159441c0f7ce61a3d23","user":{"login":"glassez","id":5063477,"avatar_url":"https://avatars.githubusercontent.com/u/5063477?v=3","gravatar_id":"","url":"https://api.github.com/users/glassez","html_url":"https://github.com/glassez","followers_url":"https://api.github.com/users/glassez/followers","following_url":"https://api.github.com/users/glassez/following{/other_user}","gists_url":"https://api.github.com/users/glassez/gists{/gist_id}","starred_url":"https://api.github.com/users/glassez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glassez/subscriptions","organizations_url":"https://api.github.com/users/glassez/orgs","repos_url":"https://api.github.com/users/glassez/repos","events_url":"https://api.github.com/users/glassez/events{/privacy}","received_events_url":"https://api.github.com/users/glassez/received_events","type":"User","site_admin":false},"repo":{"id":11788320,"name":"qBittorrent","full_name":"glassez/qBittorrent","owner":{"login":"glassez","id":5063477,"avatar_url":"https://avatars.githubusercontent.com/u/5063477?v=3","gravatar_id":"","url":"https://api.github.com/users/glassez","html_url":"https://github.com/glassez","followers_url":"https://api.github.com/users/glassez/followers","following_url":"https://api.github.com/users/glassez/following{/other_user}","gists_url":"https://api.github.com/users/glassez/gists{/gist_id}","starred_url":"https://api.github.com/users/glassez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glassez/subscriptions","organizations_url":"https://api.github.com/users/glassez/orgs","repos_url":"https://api.github.com/users/glassez/repos","events_url":"https://api.github.com/users/glassez/events{/privacy}","received_events_url":"https://api.github.com/users/glassez/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/glassez/qBittorrent","description":"qBittorrent BitTorrent client","fork":true,"url":"https://api.github.com/repos/glassez/qBittorrent","forks_url":"https://api.github.com/repos/glassez/qBittorrent/forks","keys_url":"https://api.github.com/repos/glassez/qBittorrent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/glassez/qBittorrent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/glassez/qBittorrent/teams","hooks_url":"https://api.github.com/repos/glassez/qBittorrent/hooks","issue_events_url":"https://api.github.com/repos/glassez/qBittorrent/issues/events{/number}","events_url":"https://api.github.com/repos/glassez/qBittorrent/events","assignees_url":"https://api.github.com/repos/glassez/qBittorrent/assignees{/user}","branches_url":"https://api.github.com/repos/glassez/qBittorrent/branches{/branch}","tags_url":"https://api.github.com/repos/glassez/qBittorrent/tags","blobs_url":"https://api.github.com/repos/glassez/qBittorrent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/glassez/qBittorrent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/glassez/qBittorrent/git/refs{/sha}","trees_url":"https://api.github.com/repos/glassez/qBittorrent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/glassez/qBittorrent/statuses/{sha}","languages_url":"https://api.github.com/repos/glassez/qBittorrent/languages","stargazers_url":"https://api.github.com/repos/glassez/qBittorrent/stargazers","contributors_url":"https://api.github.com/repos/glassez/qBittorrent/contributors","subscribers_url":"https://api.github.com/repos/glassez/qBittorrent/subscribers","subscription_url":"https://api.github.com/repos/glassez/qBittorrent/subscription","commits_url":"https://api.github.com/repos/glassez/qBittorrent/commits{/sha}","git_commits_url":"https://api.github.com/repos/glassez/qBittorrent/git/commits{/sha}","comments_url":"https://api.github.com/repos/glassez/qBittorrent/comments{/number}","issue_comment_url":"https://api.github.com/repos/glassez/qBittorrent/issues/comments{/number}","contents_url":"https://api.github.com/repos/glassez/qBittorrent/contents/{+path}","compare_url":"https://api.github.com/repos/glassez/qBittorrent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/glassez/qBittorrent/merges","archive_url":"https://api.github.com/repos/glassez/qBittorrent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/glassez/qBittorrent/downloads","issues_url":"https://api.github.com/repos/glassez/qBittorrent/issues{/number}","pulls_url":"https://api.github.com/repos/glassez/qBittorrent/pulls{/number}","milestones_url":"https://api.github.com/repos/glassez/qBittorrent/milestones{/number}","notifications_url":"https://api.github.com/repos/glassez/qBittorrent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/glassez/qBittorrent/labels{/name}","releases_url":"https://api.github.com/repos/glassez/qBittorrent/releases{/id}","deployments_url":"https://api.github.com/repos/glassez/qBittorrent/deployments","created_at":"2013-07-31T10:19:53Z","updated_at":"2015-02-06T06:53:17Z","pushed_at":"2016-03-26T05:12:09Z","git_url":"git://github.com/glassez/qBittorrent.git","ssh_url":"git@github.com:glassez/qBittorrent.git","clone_url":"https://github.com/glassez/qBittorrent.git","svn_url":"https://github.com/glassez/qBittorrent","homepage":"http://www.qbittorrent.org","size":111750,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"qbittorrent:master","ref":"master","sha":"cef150eee61d0269838d9978cdbb751146336cc8","user":{"login":"qbittorrent","id":2131270,"avatar_url":"https://avatars.githubusercontent.com/u/2131270?v=3","gravatar_id":"","url":"https://api.github.com/users/qbittorrent","html_url":"https://github.com/qbittorrent","followers_url":"https://api.github.com/users/qbittorrent/followers","following_url":"https://api.github.com/users/qbittorrent/following{/other_user}","gists_url":"https://api.github.com/users/qbittorrent/gists{/gist_id}","starred_url":"https://api.github.com/users/qbittorrent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qbittorrent/subscriptions","organizations_url":"https://api.github.com/users/qbittorrent/orgs","repos_url":"https://api.github.com/users/qbittorrent/repos","events_url":"https://api.github.com/users/qbittorrent/events{/privacy}","received_events_url":"https://api.github.com/users/qbittorrent/received_events","type":"Organization","site_admin":false},"repo":{"id":3351871,"name":"qBittorrent","full_name":"qbittorrent/qBittorrent","owner":{"login":"qbittorrent","id":2131270,"avatar_url":"https://avatars.githubusercontent.com/u/2131270?v=3","gravatar_id":"","url":"https://api.github.com/users/qbittorrent","html_url":"https://github.com/qbittorrent","followers_url":"https://api.github.com/users/qbittorrent/followers","following_url":"https://api.github.com/users/qbittorrent/following{/other_user}","gists_url":"https://api.github.com/users/qbittorrent/gists{/gist_id}","starred_url":"https://api.github.com/users/qbittorrent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qbittorrent/subscriptions","organizations_url":"https://api.github.com/users/qbittorrent/orgs","repos_url":"https://api.github.com/users/qbittorrent/repos","events_url":"https://api.github.com/users/qbittorrent/events{/privacy}","received_events_url":"https://api.github.com/users/qbittorrent/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/qbittorrent/qBittorrent","description":"qBittorrent BitTorrent client","fork":false,"url":"https://api.github.com/repos/qbittorrent/qBittorrent","forks_url":"https://api.github.com/repos/qbittorrent/qBittorrent/forks","keys_url":"https://api.github.com/repos/qbittorrent/qBittorrent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qbittorrent/qBittorrent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qbittorrent/qBittorrent/teams","hooks_url":"https://api.github.com/repos/qbittorrent/qBittorrent/hooks","issue_events_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/events{/number}","events_url":"https://api.github.com/repos/qbittorrent/qBittorrent/events","assignees_url":"https://api.github.com/repos/qbittorrent/qBittorrent/assignees{/user}","branches_url":"https://api.github.com/repos/qbittorrent/qBittorrent/branches{/branch}","tags_url":"https://api.github.com/repos/qbittorrent/qBittorrent/tags","blobs_url":"https://api.github.com/repos/qbittorrent/qBittorrent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qbittorrent/qBittorrent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qbittorrent/qBittorrent/git/refs{/sha}","trees_url":"https://api.github.com/repos/qbittorrent/qBittorrent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qbittorrent/qBittorrent/statuses/{sha}","languages_url":"https://api.github.com/repos/qbittorrent/qBittorrent/languages","stargazers_url":"https://api.github.com/repos/qbittorrent/qBittorrent/stargazers","contributors_url":"https://api.github.com/repos/qbittorrent/qBittorrent/contributors","subscribers_url":"https://api.github.com/repos/qbittorrent/qBittorrent/subscribers","subscription_url":"https://api.github.com/repos/qbittorrent/qBittorrent/subscription","commits_url":"https://api.github.com/repos/qbittorrent/qBittorrent/commits{/sha}","git_commits_url":"https://api.github.com/repos/qbittorrent/qBittorrent/git/commits{/sha}","comments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/comments{/number}","issue_comment_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/comments{/number}","contents_url":"https://api.github.com/repos/qbittorrent/qBittorrent/contents/{+path}","compare_url":"https://api.github.com/repos/qbittorrent/qBittorrent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qbittorrent/qBittorrent/merges","archive_url":"https://api.github.com/repos/qbittorrent/qBittorrent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qbittorrent/qBittorrent/downloads","issues_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues{/number}","pulls_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls{/number}","milestones_url":"https://api.github.com/repos/qbittorrent/qBittorrent/milestones{/number}","notifications_url":"https://api.github.com/repos/qbittorrent/qBittorrent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qbittorrent/qBittorrent/labels{/name}","releases_url":"https://api.github.com/repos/qbittorrent/qBittorrent/releases{/id}","deployments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/deployments","created_at":"2012-02-04T09:37:46Z","updated_at":"2016-03-25T13:21:38Z","pushed_at":"2016-03-26T05:12:10Z","git_url":"git://github.com/qbittorrent/qBittorrent.git","ssh_url":"git@github.com:qbittorrent/qBittorrent.git","clone_url":"https://github.com/qbittorrent/qBittorrent.git","svn_url":"https://github.com/qbittorrent/qBittorrent","homepage":"http://www.qbittorrent.org","size":128358,"stargazers_count":1619,"watchers_count":1619,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":454,"mirror_url":null,"open_issues_count":1441,"forks":454,"open_issues":1441,"watchers":1619,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/4961"},"html":{"href":"https://github.com/qbittorrent/qBittorrent/pull/4961"},"issue":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/4961"},"comments":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/4961/comments"},"review_comments":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/4961/comments"},"review_comment":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/4961/commits"},"statuses":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/statuses/645c3bf69f32fe91ef6d9159441c0f7ce61a3d23"}}}}