{"action":"created","comment":{"url":"https://api.github.com/repos/fmtlib/fmt/pulls/comments/187773319","pull_request_review_id":119626839,"id":187773319,"diff_hunk":"@@ -0,0 +1,224 @@\n+// Formatting library for C++ - the core API\n+//\n+// Copyright (c) 2012 - present, Victor Zverovich\n+// All rights reserved.\n+//\n+// For the license information refer to format.h.\n+//\n+// Copyright (c) 2018 - present, Remotion (Igor Schulz)\n+// All Rights Reserved\n+// {fmt} support for ranges, containers and types tuple interface.\n+\n+#ifndef FMT_RANGES_H_\n+#define FMT_RANGES_H_\n+\n+#include \"format.h\"\n+#include <type_traits>\n+\n+// output only up to N items from the range.\n+#ifndef FMT_RANGE_OUTPUT_LENGTH_LIMIT\n+#define FMT_RANGE_OUTPUT_LENGTH_LIMIT 256\n+#endif\n+\n+namespace fmt {\n+\n+template <typename Char>\n+struct formatting_base {\n+\ttemplate <typename ParseContext>\n+\tFMT_CONSTEXPR auto parse(ParseContext &ctx) -> decltype(ctx.begin()) { return ctx.begin(); }\n+};\n+\n+template <typename Char, typename Enable = void>\n+struct formatting_range : formatting_base<Char>\n+{\n+\tChar prefix = '{';\n+\tChar delimiter = ',';\n+\tChar postfix = '}';\n+\tbool add_spaces = true;\n+};\n+\n+template <typename Char, typename Enable = void>\n+struct formatting_tuple : formatting_base<Char>\n+{\n+\tChar prefix = '[';\n+\tChar delimiter = ',';\n+\tChar postfix = ']';\n+\tbool add_spaces = true;\n+};\n+\n+template<typename RangeT, typename OutputIterator>\n+void copy(const RangeT &range, OutputIterator out) {\n+\tfor (const auto& it : range) {\n+\t\t*out++ = it;\n+\t}\n+}\n+\n+template<typename OutputIterator>\n+void copy(const char *str, OutputIterator out) {\n+\tconst char* p_curr = str;\n+\twhile (*p_curr) {\n+\t\t*out++ = *p_curr++;\n+\t}\n+}\n+\n+template<typename OutputIterator>\n+void copy(const char ch, OutputIterator out) {\n+\t*out++ = ch;\n+}","path":"include/fmt/ranges.h","position":67,"original_position":67,"commit_id":"50ee89b223f5b19071dfe48f7160a6d1f2a1fca7","original_commit_id":"50ee89b223f5b19071dfe48f7160a6d1f2a1fca7","user":{"login":"vitaut","id":576385,"avatar_url":"https://avatars1.githubusercontent.com/u/576385?v=4","gravatar_id":"","url":"https://api.github.com/users/vitaut","html_url":"https://github.com/vitaut","followers_url":"https://api.github.com/users/vitaut/followers","following_url":"https://api.github.com/users/vitaut/following{/other_user}","gists_url":"https://api.github.com/users/vitaut/gists{/gist_id}","starred_url":"https://api.github.com/users/vitaut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitaut/subscriptions","organizations_url":"https://api.github.com/users/vitaut/orgs","repos_url":"https://api.github.com/users/vitaut/repos","events_url":"https://api.github.com/users/vitaut/events{/privacy}","received_events_url":"https://api.github.com/users/vitaut/received_events","type":"User","site_admin":false},"body":"I suggest putting all of the above in the `internal` namespace.","created_at":"2018-05-12T13:44:47Z","updated_at":"2018-05-12T14:00:19Z","html_url":"https://github.com/fmtlib/fmt/pull/735#discussion_r187773319","pull_request_url":"https://api.github.com/repos/fmtlib/fmt/pulls/735","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/fmtlib/fmt/pulls/comments/187773319"},"html":{"href":"https://github.com/fmtlib/fmt/pull/735#discussion_r187773319"},"pull_request":{"href":"https://api.github.com/repos/fmtlib/fmt/pulls/735"}}},"pull_request":{"url":"https://api.github.com/repos/fmtlib/fmt/pulls/735","id":187203988,"html_url":"https://github.com/fmtlib/fmt/pull/735","diff_url":"https://github.com/fmtlib/fmt/pull/735.diff","patch_url":"https://github.com/fmtlib/fmt/pull/735.patch","issue_url":"https://api.github.com/repos/fmtlib/fmt/issues/735","number":735,"state":"open","locked":false,"title":"Add support for ranges, containers and types tuple interface...","user":{"login":"Remotion","id":3511547,"avatar_url":"https://avatars2.githubusercontent.com/u/3511547?v=4","gravatar_id":"","url":"https://api.github.com/users/Remotion","html_url":"https://github.com/Remotion","followers_url":"https://api.github.com/users/Remotion/followers","following_url":"https://api.github.com/users/Remotion/following{/other_user}","gists_url":"https://api.github.com/users/Remotion/gists{/gist_id}","starred_url":"https://api.github.com/users/Remotion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Remotion/subscriptions","organizations_url":"https://api.github.com/users/Remotion/orgs","repos_url":"https://api.github.com/users/Remotion/repos","events_url":"https://api.github.com/users/Remotion/events{/privacy}","received_events_url":"https://api.github.com/users/Remotion/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-10T14:12:50Z","updated_at":"2018-05-12T14:00:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dba9ef7c5bd4abf02a7597a5b43b4e443444b31e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/fmtlib/fmt/pulls/735/commits","review_comments_url":"https://api.github.com/repos/fmtlib/fmt/pulls/735/comments","review_comment_url":"https://api.github.com/repos/fmtlib/fmt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fmtlib/fmt/issues/735/comments","statuses_url":"https://api.github.com/repos/fmtlib/fmt/statuses/50ee89b223f5b19071dfe48f7160a6d1f2a1fca7","head":{"label":"Remotion:master","ref":"master","sha":"50ee89b223f5b19071dfe48f7160a6d1f2a1fca7","user":{"login":"Remotion","id":3511547,"avatar_url":"https://avatars2.githubusercontent.com/u/3511547?v=4","gravatar_id":"","url":"https://api.github.com/users/Remotion","html_url":"https://github.com/Remotion","followers_url":"https://api.github.com/users/Remotion/followers","following_url":"https://api.github.com/users/Remotion/following{/other_user}","gists_url":"https://api.github.com/users/Remotion/gists{/gist_id}","starred_url":"https://api.github.com/users/Remotion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Remotion/subscriptions","organizations_url":"https://api.github.com/users/Remotion/orgs","repos_url":"https://api.github.com/users/Remotion/repos","events_url":"https://api.github.com/users/Remotion/events{/privacy}","received_events_url":"https://api.github.com/users/Remotion/received_events","type":"User","site_admin":false},"repo":{"id":132607451,"name":"fmt-fork","full_name":"Remotion/fmt-fork","owner":{"login":"Remotion","id":3511547,"avatar_url":"https://avatars2.githubusercontent.com/u/3511547?v=4","gravatar_id":"","url":"https://api.github.com/users/Remotion","html_url":"https://github.com/Remotion","followers_url":"https://api.github.com/users/Remotion/followers","following_url":"https://api.github.com/users/Remotion/following{/other_user}","gists_url":"https://api.github.com/users/Remotion/gists{/gist_id}","starred_url":"https://api.github.com/users/Remotion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Remotion/subscriptions","organizations_url":"https://api.github.com/users/Remotion/orgs","repos_url":"https://api.github.com/users/Remotion/repos","events_url":"https://api.github.com/users/Remotion/events{/privacy}","received_events_url":"https://api.github.com/users/Remotion/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Remotion/fmt-fork","description":"A modern formatting library","fork":true,"url":"https://api.github.com/repos/Remotion/fmt-fork","forks_url":"https://api.github.com/repos/Remotion/fmt-fork/forks","keys_url":"https://api.github.com/repos/Remotion/fmt-fork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Remotion/fmt-fork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Remotion/fmt-fork/teams","hooks_url":"https://api.github.com/repos/Remotion/fmt-fork/hooks","issue_events_url":"https://api.github.com/repos/Remotion/fmt-fork/issues/events{/number}","events_url":"https://api.github.com/repos/Remotion/fmt-fork/events","assignees_url":"https://api.github.com/repos/Remotion/fmt-fork/assignees{/user}","branches_url":"https://api.github.com/repos/Remotion/fmt-fork/branches{/branch}","tags_url":"https://api.github.com/repos/Remotion/fmt-fork/tags","blobs_url":"https://api.github.com/repos/Remotion/fmt-fork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Remotion/fmt-fork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Remotion/fmt-fork/git/refs{/sha}","trees_url":"https://api.github.com/repos/Remotion/fmt-fork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Remotion/fmt-fork/statuses/{sha}","languages_url":"https://api.github.com/repos/Remotion/fmt-fork/languages","stargazers_url":"https://api.github.com/repos/Remotion/fmt-fork/stargazers","contributors_url":"https://api.github.com/repos/Remotion/fmt-fork/contributors","subscribers_url":"https://api.github.com/repos/Remotion/fmt-fork/subscribers","subscription_url":"https://api.github.com/repos/Remotion/fmt-fork/subscription","commits_url":"https://api.github.com/repos/Remotion/fmt-fork/commits{/sha}","git_commits_url":"https://api.github.com/repos/Remotion/fmt-fork/git/commits{/sha}","comments_url":"https://api.github.com/repos/Remotion/fmt-fork/comments{/number}","issue_comment_url":"https://api.github.com/repos/Remotion/fmt-fork/issues/comments{/number}","contents_url":"https://api.github.com/repos/Remotion/fmt-fork/contents/{+path}","compare_url":"https://api.github.com/repos/Remotion/fmt-fork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Remotion/fmt-fork/merges","archive_url":"https://api.github.com/repos/Remotion/fmt-fork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Remotion/fmt-fork/downloads","issues_url":"https://api.github.com/repos/Remotion/fmt-fork/issues{/number}","pulls_url":"https://api.github.com/repos/Remotion/fmt-fork/pulls{/number}","milestones_url":"https://api.github.com/repos/Remotion/fmt-fork/milestones{/number}","notifications_url":"https://api.github.com/repos/Remotion/fmt-fork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Remotion/fmt-fork/labels{/name}","releases_url":"https://api.github.com/repos/Remotion/fmt-fork/releases{/id}","deployments_url":"https://api.github.com/repos/Remotion/fmt-fork/deployments","created_at":"2018-05-08T12:42:55Z","updated_at":"2018-05-10T14:17:34Z","pushed_at":"2018-05-10T14:17:33Z","git_url":"git://github.com/Remotion/fmt-fork.git","ssh_url":"git@github.com:Remotion/fmt-fork.git","clone_url":"https://github.com/Remotion/fmt-fork.git","svn_url":"https://github.com/Remotion/fmt-fork","homepage":"http://fmtlib.net","size":6068,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fmtlib:master","ref":"master","sha":"46c374a8a95eaac2a47c51393079a10a22607ef8","user":{"login":"fmtlib","id":7280830,"avatar_url":"https://avatars0.githubusercontent.com/u/7280830?v=4","gravatar_id":"","url":"https://api.github.com/users/fmtlib","html_url":"https://github.com/fmtlib","followers_url":"https://api.github.com/users/fmtlib/followers","following_url":"https://api.github.com/users/fmtlib/following{/other_user}","gists_url":"https://api.github.com/users/fmtlib/gists{/gist_id}","starred_url":"https://api.github.com/users/fmtlib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fmtlib/subscriptions","organizations_url":"https://api.github.com/users/fmtlib/orgs","repos_url":"https://api.github.com/users/fmtlib/repos","events_url":"https://api.github.com/users/fmtlib/events{/privacy}","received_events_url":"https://api.github.com/users/fmtlib/received_events","type":"Organization","site_admin":false},"repo":{"id":7056202,"name":"fmt","full_name":"fmtlib/fmt","owner":{"login":"fmtlib","id":7280830,"avatar_url":"https://avatars0.githubusercontent.com/u/7280830?v=4","gravatar_id":"","url":"https://api.github.com/users/fmtlib","html_url":"https://github.com/fmtlib","followers_url":"https://api.github.com/users/fmtlib/followers","following_url":"https://api.github.com/users/fmtlib/following{/other_user}","gists_url":"https://api.github.com/users/fmtlib/gists{/gist_id}","starred_url":"https://api.github.com/users/fmtlib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fmtlib/subscriptions","organizations_url":"https://api.github.com/users/fmtlib/orgs","repos_url":"https://api.github.com/users/fmtlib/repos","events_url":"https://api.github.com/users/fmtlib/events{/privacy}","received_events_url":"https://api.github.com/users/fmtlib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fmtlib/fmt","description":"A modern formatting library","fork":false,"url":"https://api.github.com/repos/fmtlib/fmt","forks_url":"https://api.github.com/repos/fmtlib/fmt/forks","keys_url":"https://api.github.com/repos/fmtlib/fmt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fmtlib/fmt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fmtlib/fmt/teams","hooks_url":"https://api.github.com/repos/fmtlib/fmt/hooks","issue_events_url":"https://api.github.com/repos/fmtlib/fmt/issues/events{/number}","events_url":"https://api.github.com/repos/fmtlib/fmt/events","assignees_url":"https://api.github.com/repos/fmtlib/fmt/assignees{/user}","branches_url":"https://api.github.com/repos/fmtlib/fmt/branches{/branch}","tags_url":"https://api.github.com/repos/fmtlib/fmt/tags","blobs_url":"https://api.github.com/repos/fmtlib/fmt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fmtlib/fmt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fmtlib/fmt/git/refs{/sha}","trees_url":"https://api.github.com/repos/fmtlib/fmt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fmtlib/fmt/statuses/{sha}","languages_url":"https://api.github.com/repos/fmtlib/fmt/languages","stargazers_url":"https://api.github.com/repos/fmtlib/fmt/stargazers","contributors_url":"https://api.github.com/repos/fmtlib/fmt/contributors","subscribers_url":"https://api.github.com/repos/fmtlib/fmt/subscribers","subscription_url":"https://api.github.com/repos/fmtlib/fmt/subscription","commits_url":"https://api.github.com/repos/fmtlib/fmt/commits{/sha}","git_commits_url":"https://api.github.com/repos/fmtlib/fmt/git/commits{/sha}","comments_url":"https://api.github.com/repos/fmtlib/fmt/comments{/number}","issue_comment_url":"https://api.github.com/repos/fmtlib/fmt/issues/comments{/number}","contents_url":"https://api.github.com/repos/fmtlib/fmt/contents/{+path}","compare_url":"https://api.github.com/repos/fmtlib/fmt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fmtlib/fmt/merges","archive_url":"https://api.github.com/repos/fmtlib/fmt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fmtlib/fmt/downloads","issues_url":"https://api.github.com/repos/fmtlib/fmt/issues{/number}","pulls_url":"https://api.github.com/repos/fmtlib/fmt/pulls{/number}","milestones_url":"https://api.github.com/repos/fmtlib/fmt/milestones{/number}","notifications_url":"https://api.github.com/repos/fmtlib/fmt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fmtlib/fmt/labels{/name}","releases_url":"https://api.github.com/repos/fmtlib/fmt/releases{/id}","deployments_url":"https://api.github.com/repos/fmtlib/fmt/deployments","created_at":"2012-12-07T16:26:46Z","updated_at":"2018-05-12T13:38:33Z","pushed_at":"2018-05-12T10:50:12Z","git_url":"git://github.com/fmtlib/fmt.git","ssh_url":"git@github.com:fmtlib/fmt.git","clone_url":"https://github.com/fmtlib/fmt.git","svn_url":"https://github.com/fmtlib/fmt","homepage":"http://fmtlib.net","size":6075,"stargazers_count":3753,"watchers_count":3753,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":483,"mirror_url":null,"archived":false,"open_issues_count":16,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause"},"forks":483,"open_issues":16,"watchers":3753,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fmtlib/fmt/pulls/735"},"html":{"href":"https://github.com/fmtlib/fmt/pull/735"},"issue":{"href":"https://api.github.com/repos/fmtlib/fmt/issues/735"},"comments":{"href":"https://api.github.com/repos/fmtlib/fmt/issues/735/comments"},"review_comments":{"href":"https://api.github.com/repos/fmtlib/fmt/pulls/735/comments"},"review_comment":{"href":"https://api.github.com/repos/fmtlib/fmt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fmtlib/fmt/pulls/735/commits"},"statuses":{"href":"https://api.github.com/repos/fmtlib/fmt/statuses/50ee89b223f5b19071dfe48f7160a6d1f2a1fca7"}},"author_association":"NONE"}}
{"actor":{"display_login":"vitaut"}}