{"action":"created","comment":{"url":"https://api.github.com/repos/c5t/Current/pulls/comments/33100570","id":33100570,"diff_hunk":"@@ -285,21 +285,31 @@ struct GenericEntryPublisher : GenericPublisher {};\n template <typename IMPL, typename ENTRY>\n class Publisher : public GenericEntryPublisher<ENTRY>, public IMPL {\n  public:\n-  template <typename... ARGS>\n-  explicit Publisher(ARGS&&... args)\n-      : IMPL(std::forward<ARGS>(args)...) {}\n+  // The best option to make this generic code build universally is to have `clone`\n+  // always passed in explicitly as the first parameter. -- D.K.\n+  template <typename... EXTRA_PARAMS>\n+  explicit Publisher(std::function<ENTRY(const ENTRY&)> clone, EXTRA_PARAMS&&... extra_params)\n+      : IMPL(clone, std::forward<EXTRA_PARAMS>(extra_params)...) {}\n+\n+  inline size_t Publish(const ENTRY& e) { return IMPL::DoPublishByConstReference(e); }\n \n-  template <typename E>\n-  inline size_t Publish(E&& e) {\n-    // TODO(dkorolev): Actually support the case when `DoPublish()` only accepts an rvalue.\n-    return IMPL::DoPublish(std::forward<E>(e));\n+  inline size_t Publish(ENTRY&& e) {\n+    // TODO(dkorolev): SFINAE to support the case when `IMPL::DoPublishByConstReference()` should be used.\n+    return IMPL::DoPublishByRValueReference(std::move(e));\n   }\n \n   template <typename... ARGS>\n   inline size_t Emplace(ARGS&&... args) {\n-    // TODO(dkorolev): Actually support the case when `Emplace()` should internally use `Publish()`.\n+    // TODO(dkorolev): SFINAE to support the case when `IMPL::DoPublishByConstReference()` should be used.\n     return IMPL::DoEmplace(std::forward<ARGS>(args)...);\n   }\n+\n+  // Special case of publishing `const DERIVED&` into a stream of `std::unique_ptr<BASE>`.","path":"Blocks/SS/ss.h","position":31,"original_position":31,"commit_id":"cfc7dc95eb930f750637a7132aa459f614a13532","original_commit_id":"cfc7dc95eb930f750637a7132aa459f614a13532","user":{"login":"dkorolev","id":2159447,"avatar_url":"https://avatars.githubusercontent.com/u/2159447?v=3","gravatar_id":"","url":"https://api.github.com/users/dkorolev","html_url":"https://github.com/dkorolev","followers_url":"https://api.github.com/users/dkorolev/followers","following_url":"https://api.github.com/users/dkorolev/following{/other_user}","gists_url":"https://api.github.com/users/dkorolev/gists{/gist_id}","starred_url":"https://api.github.com/users/dkorolev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkorolev/subscriptions","organizations_url":"https://api.github.com/users/dkorolev/orgs","repos_url":"https://api.github.com/users/dkorolev/repos","events_url":"https://api.github.com/users/dkorolev/events{/privacy}","received_events_url":"https://api.github.com/users/dkorolev/received_events","type":"User","site_admin":false},"body":"Fixed!","created_at":"2015-06-23T22:31:54Z","updated_at":"2015-06-23T22:31:54Z","html_url":"https://github.com/c5t/Current/pull/221#discussion_r33100570","pull_request_url":"https://api.github.com/repos/c5t/Current/pulls/221","_links":{"self":{"href":"https://api.github.com/repos/c5t/Current/pulls/comments/33100570"},"html":{"href":"https://github.com/c5t/Current/pull/221#discussion_r33100570"},"pull_request":{"href":"https://api.github.com/repos/c5t/Current/pulls/221"}}},"pull_request":{"url":"https://api.github.com/repos/c5t/Current/pulls/221","id":38312072,"html_url":"https://github.com/c5t/Current/pull/221","diff_url":"https://github.com/c5t/Current/pull/221.diff","patch_url":"https://github.com/c5t/Current/pull/221.patch","issue_url":"https://api.github.com/repos/c5t/Current/issues/221","number":221,"state":"open","locked":false,"title":"Sherlock and Yoda ready for persistence.","user":{"login":"dkorolev","id":2159447,"avatar_url":"https://avatars.githubusercontent.com/u/2159447?v=3","gravatar_id":"","url":"https://api.github.com/users/dkorolev","html_url":"https://github.com/dkorolev","followers_url":"https://api.github.com/users/dkorolev/followers","following_url":"https://api.github.com/users/dkorolev/following{/other_user}","gists_url":"https://api.github.com/users/dkorolev/gists{/gist_id}","starred_url":"https://api.github.com/users/dkorolev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkorolev/subscriptions","organizations_url":"https://api.github.com/users/dkorolev/orgs","repos_url":"https://api.github.com/users/dkorolev/repos","events_url":"https://api.github.com/users/dkorolev/events{/privacy}","received_events_url":"https://api.github.com/users/dkorolev/received_events","type":"User","site_admin":false},"body":"Hi @mzhurovich,\r\n\r\nThis pull request follows https://github.com/c5t/Current/pull/220.\r\n\r\nA few things were not easy and a few are still suboptimal in the code. Need your advice on how to best make it neat.\r\n\r\nIn retrospect, it's great to see our C++ code behave functional. I spent way more time compiling it than making sure it works as expected. That's how it should be!\r\n\r\nThanks!\r\nDima","created_at":"2015-06-23T08:28:49Z","updated_at":"2015-06-23T22:31:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7763d84c0b64a111efa8498723d432a0f7ee4488","assignee":{"login":"mzhurovich","id":11226961,"avatar_url":"https://avatars.githubusercontent.com/u/11226961?v=3","gravatar_id":"","url":"https://api.github.com/users/mzhurovich","html_url":"https://github.com/mzhurovich","followers_url":"https://api.github.com/users/mzhurovich/followers","following_url":"https://api.github.com/users/mzhurovich/following{/other_user}","gists_url":"https://api.github.com/users/mzhurovich/gists{/gist_id}","starred_url":"https://api.github.com/users/mzhurovich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mzhurovich/subscriptions","organizations_url":"https://api.github.com/users/mzhurovich/orgs","repos_url":"https://api.github.com/users/mzhurovich/repos","events_url":"https://api.github.com/users/mzhurovich/events{/privacy}","received_events_url":"https://api.github.com/users/mzhurovich/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/c5t/Current/pulls/221/commits","review_comments_url":"https://api.github.com/repos/c5t/Current/pulls/221/comments","review_comment_url":"https://api.github.com/repos/c5t/Current/pulls/comments{/number}","comments_url":"https://api.github.com/repos/c5t/Current/issues/221/comments","statuses_url":"https://api.github.com/repos/c5t/Current/statuses/cfc7dc95eb930f750637a7132aa459f614a13532","head":{"label":"dkorolev:master3","ref":"master3","sha":"cfc7dc95eb930f750637a7132aa459f614a13532","user":{"login":"dkorolev","id":2159447,"avatar_url":"https://avatars.githubusercontent.com/u/2159447?v=3","gravatar_id":"","url":"https://api.github.com/users/dkorolev","html_url":"https://github.com/dkorolev","followers_url":"https://api.github.com/users/dkorolev/followers","following_url":"https://api.github.com/users/dkorolev/following{/other_user}","gists_url":"https://api.github.com/users/dkorolev/gists{/gist_id}","starred_url":"https://api.github.com/users/dkorolev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkorolev/subscriptions","organizations_url":"https://api.github.com/users/dkorolev/orgs","repos_url":"https://api.github.com/users/dkorolev/repos","events_url":"https://api.github.com/users/dkorolev/events{/privacy}","received_events_url":"https://api.github.com/users/dkorolev/received_events","type":"User","site_admin":false},"repo":{"id":27625438,"name":"Current","full_name":"dkorolev/Current","owner":{"login":"dkorolev","id":2159447,"avatar_url":"https://avatars.githubusercontent.com/u/2159447?v=3","gravatar_id":"","url":"https://api.github.com/users/dkorolev","html_url":"https://github.com/dkorolev","followers_url":"https://api.github.com/users/dkorolev/followers","following_url":"https://api.github.com/users/dkorolev/following{/other_user}","gists_url":"https://api.github.com/users/dkorolev/gists{/gist_id}","starred_url":"https://api.github.com/users/dkorolev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkorolev/subscriptions","organizations_url":"https://api.github.com/users/dkorolev/orgs","repos_url":"https://api.github.com/users/dkorolev/repos","events_url":"https://api.github.com/users/dkorolev/events{/privacy}","received_events_url":"https://api.github.com/users/dkorolev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dkorolev/Current","description":"Current is a data-centric framework","fork":true,"url":"https://api.github.com/repos/dkorolev/Current","forks_url":"https://api.github.com/repos/dkorolev/Current/forks","keys_url":"https://api.github.com/repos/dkorolev/Current/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dkorolev/Current/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dkorolev/Current/teams","hooks_url":"https://api.github.com/repos/dkorolev/Current/hooks","issue_events_url":"https://api.github.com/repos/dkorolev/Current/issues/events{/number}","events_url":"https://api.github.com/repos/dkorolev/Current/events","assignees_url":"https://api.github.com/repos/dkorolev/Current/assignees{/user}","branches_url":"https://api.github.com/repos/dkorolev/Current/branches{/branch}","tags_url":"https://api.github.com/repos/dkorolev/Current/tags","blobs_url":"https://api.github.com/repos/dkorolev/Current/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dkorolev/Current/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dkorolev/Current/git/refs{/sha}","trees_url":"https://api.github.com/repos/dkorolev/Current/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dkorolev/Current/statuses/{sha}","languages_url":"https://api.github.com/repos/dkorolev/Current/languages","stargazers_url":"https://api.github.com/repos/dkorolev/Current/stargazers","contributors_url":"https://api.github.com/repos/dkorolev/Current/contributors","subscribers_url":"https://api.github.com/repos/dkorolev/Current/subscribers","subscription_url":"https://api.github.com/repos/dkorolev/Current/subscription","commits_url":"https://api.github.com/repos/dkorolev/Current/commits{/sha}","git_commits_url":"https://api.github.com/repos/dkorolev/Current/git/commits{/sha}","comments_url":"https://api.github.com/repos/dkorolev/Current/comments{/number}","issue_comment_url":"https://api.github.com/repos/dkorolev/Current/issues/comments{/number}","contents_url":"https://api.github.com/repos/dkorolev/Current/contents/{+path}","compare_url":"https://api.github.com/repos/dkorolev/Current/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dkorolev/Current/merges","archive_url":"https://api.github.com/repos/dkorolev/Current/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dkorolev/Current/downloads","issues_url":"https://api.github.com/repos/dkorolev/Current/issues{/number}","pulls_url":"https://api.github.com/repos/dkorolev/Current/pulls{/number}","milestones_url":"https://api.github.com/repos/dkorolev/Current/milestones{/number}","notifications_url":"https://api.github.com/repos/dkorolev/Current/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dkorolev/Current/labels{/name}","releases_url":"https://api.github.com/repos/dkorolev/Current/releases{/id}","created_at":"2014-12-06T06:52:51Z","updated_at":"2015-06-10T01:34:38Z","pushed_at":"2015-06-23T18:41:32Z","git_url":"git://github.com/dkorolev/Current.git","ssh_url":"git@github.com:dkorolev/Current.git","clone_url":"https://github.com/dkorolev/Current.git","svn_url":"https://github.com/dkorolev/Current","homepage":"","size":19293,"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":"c5t:master","ref":"master","sha":"10ee47b1957bda38c87b35052e8dade72f07b799","user":{"login":"c5t","id":12224789,"avatar_url":"https://avatars.githubusercontent.com/u/12224789?v=3","gravatar_id":"","url":"https://api.github.com/users/c5t","html_url":"https://github.com/c5t","followers_url":"https://api.github.com/users/c5t/followers","following_url":"https://api.github.com/users/c5t/following{/other_user}","gists_url":"https://api.github.com/users/c5t/gists{/gist_id}","starred_url":"https://api.github.com/users/c5t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c5t/subscriptions","organizations_url":"https://api.github.com/users/c5t/orgs","repos_url":"https://api.github.com/users/c5t/repos","events_url":"https://api.github.com/users/c5t/events{/privacy}","received_events_url":"https://api.github.com/users/c5t/received_events","type":"Organization","site_admin":false},"repo":{"id":27625425,"name":"Current","full_name":"c5t/Current","owner":{"login":"c5t","id":12224789,"avatar_url":"https://avatars.githubusercontent.com/u/12224789?v=3","gravatar_id":"","url":"https://api.github.com/users/c5t","html_url":"https://github.com/c5t","followers_url":"https://api.github.com/users/c5t/followers","following_url":"https://api.github.com/users/c5t/following{/other_user}","gists_url":"https://api.github.com/users/c5t/gists{/gist_id}","starred_url":"https://api.github.com/users/c5t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c5t/subscriptions","organizations_url":"https://api.github.com/users/c5t/orgs","repos_url":"https://api.github.com/users/c5t/repos","events_url":"https://api.github.com/users/c5t/events{/privacy}","received_events_url":"https://api.github.com/users/c5t/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/c5t/Current","description":"Current is a data-centric framework.","fork":false,"url":"https://api.github.com/repos/c5t/Current","forks_url":"https://api.github.com/repos/c5t/Current/forks","keys_url":"https://api.github.com/repos/c5t/Current/keys{/key_id}","collaborators_url":"https://api.github.com/repos/c5t/Current/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/c5t/Current/teams","hooks_url":"https://api.github.com/repos/c5t/Current/hooks","issue_events_url":"https://api.github.com/repos/c5t/Current/issues/events{/number}","events_url":"https://api.github.com/repos/c5t/Current/events","assignees_url":"https://api.github.com/repos/c5t/Current/assignees{/user}","branches_url":"https://api.github.com/repos/c5t/Current/branches{/branch}","tags_url":"https://api.github.com/repos/c5t/Current/tags","blobs_url":"https://api.github.com/repos/c5t/Current/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/c5t/Current/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/c5t/Current/git/refs{/sha}","trees_url":"https://api.github.com/repos/c5t/Current/git/trees{/sha}","statuses_url":"https://api.github.com/repos/c5t/Current/statuses/{sha}","languages_url":"https://api.github.com/repos/c5t/Current/languages","stargazers_url":"https://api.github.com/repos/c5t/Current/stargazers","contributors_url":"https://api.github.com/repos/c5t/Current/contributors","subscribers_url":"https://api.github.com/repos/c5t/Current/subscribers","subscription_url":"https://api.github.com/repos/c5t/Current/subscription","commits_url":"https://api.github.com/repos/c5t/Current/commits{/sha}","git_commits_url":"https://api.github.com/repos/c5t/Current/git/commits{/sha}","comments_url":"https://api.github.com/repos/c5t/Current/comments{/number}","issue_comment_url":"https://api.github.com/repos/c5t/Current/issues/comments{/number}","contents_url":"https://api.github.com/repos/c5t/Current/contents/{+path}","compare_url":"https://api.github.com/repos/c5t/Current/compare/{base}...{head}","merges_url":"https://api.github.com/repos/c5t/Current/merges","archive_url":"https://api.github.com/repos/c5t/Current/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/c5t/Current/downloads","issues_url":"https://api.github.com/repos/c5t/Current/issues{/number}","pulls_url":"https://api.github.com/repos/c5t/Current/pulls{/number}","milestones_url":"https://api.github.com/repos/c5t/Current/milestones{/number}","notifications_url":"https://api.github.com/repos/c5t/Current/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/c5t/Current/labels{/name}","releases_url":"https://api.github.com/repos/c5t/Current/releases{/id}","created_at":"2014-12-06T06:52:23Z","updated_at":"2015-06-13T01:42:29Z","pushed_at":"2015-06-23T18:41:34Z","git_url":"git://github.com/c5t/Current.git","ssh_url":"git@github.com:c5t/Current.git","clone_url":"https://github.com/c5t/Current.git","svn_url":"https://github.com/c5t/Current","homepage":"","size":9863,"stargazers_count":13,"watchers_count":13,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":35,"forks":7,"open_issues":35,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/c5t/Current/pulls/221"},"html":{"href":"https://github.com/c5t/Current/pull/221"},"issue":{"href":"https://api.github.com/repos/c5t/Current/issues/221"},"comments":{"href":"https://api.github.com/repos/c5t/Current/issues/221/comments"},"review_comments":{"href":"https://api.github.com/repos/c5t/Current/pulls/221/comments"},"review_comment":{"href":"https://api.github.com/repos/c5t/Current/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/c5t/Current/pulls/221/commits"},"statuses":{"href":"https://api.github.com/repos/c5t/Current/statuses/cfc7dc95eb930f750637a7132aa459f614a13532"}}}}