{"action":"created","comment":{"url":"https://api.github.com/repos/romange/gaia/pulls/comments/352359885","pull_request_review_id":324951976,"id":352359885,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM1MjM1OTg4NQ==","diff_hunk":"@@ -43,6 +44,47 @@ template <> struct RecordTraits<std::string> {\n \n template<typename T> using FrequencyMap = absl::flat_hash_map<T, size_t>;\n \n+class AnyFreqMap {\n+public:\n+  template <class T>\n+  AnyFreqMap(FrequencyMap<T>&& m) : any_(std::move(m)) {}\n+\n+  AnyFreqMap() {}\n+\n+  bool has_value() const { return any_.has_value(); }\n+  std::type_info type() const;\n+  void Add(const AnyFreqMap& other) { extra_functions_->Add(other, this); }\n+  template <class T> FrequencyMap<T>& Cast() {\n+    CheckType(typeid(FrequencyMap<T>));\n+    return *absl::any_cast<FrequencyMap<T>>(&any_);\n+  }\n+  template <class T> const FrequencyMap<T>& Cast() const {\n+    CheckType(typeid(FrequencyMap<T>));\n+    return *absl::any_cast<FrequencyMap<T>>(&any_);\n+  }\n+\n+private:\n+  class ExtraFunctions {","path":"mr/do_context.h","position":32,"original_position":32,"commit_id":"b6aa0f7731a8af07f13c836989dba4c802d137da","original_commit_id":"b6aa0f7731a8af07f13c836989dba4c802d137da","user":{"login":"romange","id":3674760,"node_id":"MDQ6VXNlcjM2NzQ3NjA=","avatar_url":"https://avatars1.githubusercontent.com/u/3674760?v=4","gravatar_id":"","url":"https://api.github.com/users/romange","html_url":"https://github.com/romange","followers_url":"https://api.github.com/users/romange/followers","following_url":"https://api.github.com/users/romange/following{/other_user}","gists_url":"https://api.github.com/users/romange/gists{/gist_id}","starred_url":"https://api.github.com/users/romange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romange/subscriptions","organizations_url":"https://api.github.com/users/romange/orgs","repos_url":"https://api.github.com/users/romange/repos","events_url":"https://api.github.com/users/romange/events{/privacy}","received_events_url":"https://api.github.com/users/romange/received_events","type":"User","site_admin":false},"body":"where do you use this ExtraFunctions?","created_at":"2019-12-01T17:25:22Z","updated_at":"2019-12-01T17:37:07Z","html_url":"https://github.com/romange/gaia/pull/34#discussion_r352359885","pull_request_url":"https://api.github.com/repos/romange/gaia/pulls/34","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/romange/gaia/pulls/comments/352359885"},"html":{"href":"https://github.com/romange/gaia/pull/34#discussion_r352359885"},"pull_request":{"href":"https://api.github.com/repos/romange/gaia/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/romange/gaia/pulls/34","id":347347236,"node_id":"MDExOlB1bGxSZXF1ZXN0MzQ3MzQ3MjM2","html_url":"https://github.com/romange/gaia/pull/34","diff_url":"https://github.com/romange/gaia/pull/34.diff","patch_url":"https://github.com/romange/gaia/pull/34.patch","issue_url":"https://api.github.com/repos/romange/gaia/issues/34","number":34,"state":"open","locked":false,"title":"MR: Support different types of counter maps in MR, not only int.","user":{"login":"oriubimo","id":23290243,"node_id":"MDQ6VXNlcjIzMjkwMjQz","avatar_url":"https://avatars3.githubusercontent.com/u/23290243?v=4","gravatar_id":"","url":"https://api.github.com/users/oriubimo","html_url":"https://github.com/oriubimo","followers_url":"https://api.github.com/users/oriubimo/followers","following_url":"https://api.github.com/users/oriubimo/following{/other_user}","gists_url":"https://api.github.com/users/oriubimo/gists{/gist_id}","starred_url":"https://api.github.com/users/oriubimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oriubimo/subscriptions","organizations_url":"https://api.github.com/users/oriubimo/orgs","repos_url":"https://api.github.com/users/oriubimo/repos","events_url":"https://api.github.com/users/oriubimo/events{/privacy}","received_events_url":"https://api.github.com/users/oriubimo/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-12-01T16:41:18Z","updated_at":"2019-12-01T17:37:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"515839c9909c39dc17e7185c560ccfeb1eba327c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/romange/gaia/pulls/34/commits","review_comments_url":"https://api.github.com/repos/romange/gaia/pulls/34/comments","review_comment_url":"https://api.github.com/repos/romange/gaia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/romange/gaia/issues/34/comments","statuses_url":"https://api.github.com/repos/romange/gaia/statuses/b6aa0f7731a8af07f13c836989dba4c802d137da","head":{"label":"oriubimo:gen_type_maps","ref":"gen_type_maps","sha":"b6aa0f7731a8af07f13c836989dba4c802d137da","user":{"login":"oriubimo","id":23290243,"node_id":"MDQ6VXNlcjIzMjkwMjQz","avatar_url":"https://avatars3.githubusercontent.com/u/23290243?v=4","gravatar_id":"","url":"https://api.github.com/users/oriubimo","html_url":"https://github.com/oriubimo","followers_url":"https://api.github.com/users/oriubimo/followers","following_url":"https://api.github.com/users/oriubimo/following{/other_user}","gists_url":"https://api.github.com/users/oriubimo/gists{/gist_id}","starred_url":"https://api.github.com/users/oriubimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oriubimo/subscriptions","organizations_url":"https://api.github.com/users/oriubimo/orgs","repos_url":"https://api.github.com/users/oriubimo/repos","events_url":"https://api.github.com/users/oriubimo/events{/privacy}","received_events_url":"https://api.github.com/users/oriubimo/received_events","type":"User","site_admin":false},"repo":{"id":197189082,"node_id":"MDEwOlJlcG9zaXRvcnkxOTcxODkwODI=","name":"gaia","full_name":"oriubimo/gaia","private":false,"owner":{"login":"oriubimo","id":23290243,"node_id":"MDQ6VXNlcjIzMjkwMjQz","avatar_url":"https://avatars3.githubusercontent.com/u/23290243?v=4","gravatar_id":"","url":"https://api.github.com/users/oriubimo","html_url":"https://github.com/oriubimo","followers_url":"https://api.github.com/users/oriubimo/followers","following_url":"https://api.github.com/users/oriubimo/following{/other_user}","gists_url":"https://api.github.com/users/oriubimo/gists{/gist_id}","starred_url":"https://api.github.com/users/oriubimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oriubimo/subscriptions","organizations_url":"https://api.github.com/users/oriubimo/orgs","repos_url":"https://api.github.com/users/oriubimo/repos","events_url":"https://api.github.com/users/oriubimo/events{/privacy}","received_events_url":"https://api.github.com/users/oriubimo/received_events","type":"User","site_admin":false},"html_url":"https://github.com/oriubimo/gaia","description":"C++ framework for rapid server development","fork":true,"url":"https://api.github.com/repos/oriubimo/gaia","forks_url":"https://api.github.com/repos/oriubimo/gaia/forks","keys_url":"https://api.github.com/repos/oriubimo/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oriubimo/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oriubimo/gaia/teams","hooks_url":"https://api.github.com/repos/oriubimo/gaia/hooks","issue_events_url":"https://api.github.com/repos/oriubimo/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/oriubimo/gaia/events","assignees_url":"https://api.github.com/repos/oriubimo/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/oriubimo/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/oriubimo/gaia/tags","blobs_url":"https://api.github.com/repos/oriubimo/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oriubimo/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oriubimo/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/oriubimo/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oriubimo/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/oriubimo/gaia/languages","stargazers_url":"https://api.github.com/repos/oriubimo/gaia/stargazers","contributors_url":"https://api.github.com/repos/oriubimo/gaia/contributors","subscribers_url":"https://api.github.com/repos/oriubimo/gaia/subscribers","subscription_url":"https://api.github.com/repos/oriubimo/gaia/subscription","commits_url":"https://api.github.com/repos/oriubimo/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/oriubimo/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/oriubimo/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/oriubimo/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/oriubimo/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/oriubimo/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oriubimo/gaia/merges","archive_url":"https://api.github.com/repos/oriubimo/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oriubimo/gaia/downloads","issues_url":"https://api.github.com/repos/oriubimo/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/oriubimo/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/oriubimo/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/oriubimo/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oriubimo/gaia/labels{/name}","releases_url":"https://api.github.com/repos/oriubimo/gaia/releases{/id}","deployments_url":"https://api.github.com/repos/oriubimo/gaia/deployments","created_at":"2019-07-16T12:23:31Z","updated_at":"2019-07-16T12:23:34Z","pushed_at":"2019-12-01T16:40:19Z","git_url":"git://github.com/oriubimo/gaia.git","ssh_url":"git@github.com:oriubimo/gaia.git","clone_url":"https://github.com/oriubimo/gaia.git","svn_url":"https://github.com/oriubimo/gaia","homepage":"https://romange.github.io/gaia/","size":4795,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":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","node_id":"MDc6TGljZW5zZTQ="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"romange:master","ref":"master","sha":"6bad23f3ebcf8e994823ec3040f252a064e49376","user":{"login":"romange","id":3674760,"node_id":"MDQ6VXNlcjM2NzQ3NjA=","avatar_url":"https://avatars1.githubusercontent.com/u/3674760?v=4","gravatar_id":"","url":"https://api.github.com/users/romange","html_url":"https://github.com/romange","followers_url":"https://api.github.com/users/romange/followers","following_url":"https://api.github.com/users/romange/following{/other_user}","gists_url":"https://api.github.com/users/romange/gists{/gist_id}","starred_url":"https://api.github.com/users/romange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romange/subscriptions","organizations_url":"https://api.github.com/users/romange/orgs","repos_url":"https://api.github.com/users/romange/repos","events_url":"https://api.github.com/users/romange/events{/privacy}","received_events_url":"https://api.github.com/users/romange/received_events","type":"User","site_admin":false},"repo":{"id":114404005,"node_id":"MDEwOlJlcG9zaXRvcnkxMTQ0MDQwMDU=","name":"gaia","full_name":"romange/gaia","private":false,"owner":{"login":"romange","id":3674760,"node_id":"MDQ6VXNlcjM2NzQ3NjA=","avatar_url":"https://avatars1.githubusercontent.com/u/3674760?v=4","gravatar_id":"","url":"https://api.github.com/users/romange","html_url":"https://github.com/romange","followers_url":"https://api.github.com/users/romange/followers","following_url":"https://api.github.com/users/romange/following{/other_user}","gists_url":"https://api.github.com/users/romange/gists{/gist_id}","starred_url":"https://api.github.com/users/romange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romange/subscriptions","organizations_url":"https://api.github.com/users/romange/orgs","repos_url":"https://api.github.com/users/romange/repos","events_url":"https://api.github.com/users/romange/events{/privacy}","received_events_url":"https://api.github.com/users/romange/received_events","type":"User","site_admin":false},"html_url":"https://github.com/romange/gaia","description":"C++ framework for rapid server development","fork":false,"url":"https://api.github.com/repos/romange/gaia","forks_url":"https://api.github.com/repos/romange/gaia/forks","keys_url":"https://api.github.com/repos/romange/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/romange/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/romange/gaia/teams","hooks_url":"https://api.github.com/repos/romange/gaia/hooks","issue_events_url":"https://api.github.com/repos/romange/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/romange/gaia/events","assignees_url":"https://api.github.com/repos/romange/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/romange/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/romange/gaia/tags","blobs_url":"https://api.github.com/repos/romange/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/romange/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/romange/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/romange/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/romange/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/romange/gaia/languages","stargazers_url":"https://api.github.com/repos/romange/gaia/stargazers","contributors_url":"https://api.github.com/repos/romange/gaia/contributors","subscribers_url":"https://api.github.com/repos/romange/gaia/subscribers","subscription_url":"https://api.github.com/repos/romange/gaia/subscription","commits_url":"https://api.github.com/repos/romange/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/romange/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/romange/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/romange/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/romange/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/romange/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/romange/gaia/merges","archive_url":"https://api.github.com/repos/romange/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/romange/gaia/downloads","issues_url":"https://api.github.com/repos/romange/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/romange/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/romange/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/romange/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/romange/gaia/labels{/name}","releases_url":"https://api.github.com/repos/romange/gaia/releases{/id}","deployments_url":"https://api.github.com/repos/romange/gaia/deployments","created_at":"2017-12-15T19:20:34Z","updated_at":"2019-12-01T15:13:00Z","pushed_at":"2019-12-01T16:41:18Z","git_url":"git://github.com/romange/gaia.git","ssh_url":"git@github.com:romange/gaia.git","clone_url":"https://github.com/romange/gaia.git","svn_url":"https://github.com/romange/gaia","homepage":"https://romange.github.io/gaia/","size":4572,"stargazers_count":42,"watchers_count":42,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":8,"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","node_id":"MDc6TGljZW5zZTQ="},"forks":6,"open_issues":8,"watchers":42,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/romange/gaia/pulls/34"},"html":{"href":"https://github.com/romange/gaia/pull/34"},"issue":{"href":"https://api.github.com/repos/romange/gaia/issues/34"},"comments":{"href":"https://api.github.com/repos/romange/gaia/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/romange/gaia/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/romange/gaia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/romange/gaia/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/romange/gaia/statuses/b6aa0f7731a8af07f13c836989dba4c802d137da"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"romange"}}