{"action":"created","comment":{"url":"https://api.github.com/repos/root-mirror/root/pulls/comments/72037066","id":72037066,"diff_hunk":"@@ -96,47 +92,51 @@ class TDirectory {\n   /// \\param name  - Key of the object.\n   /// \\param args  - arguments to be passed to the constructor of `T`\n   template <class T, class... ARGS>\n-  std::weak_ptr<T> Create(const std::string& name, ARGS... args) {\n-    auto ptr = std::make_shared<ToContentType_t<T>>(std::forward<ARGS...>(args...));\n+  decltype(auto) Create(const std::string& name, ARGS&&... args) {","path":"core/base/v7/inc/ROOT/TDirectory.h","position":32,"original_position":32,"commit_id":"8603748a04582eaab521dde3244cff4a54ea8e13","original_commit_id":"8603748a04582eaab521dde3244cff4a54ea8e13","user":{"login":"karies","id":144675,"avatar_url":"https://avatars.githubusercontent.com/u/144675?v=3","gravatar_id":"","url":"https://api.github.com/users/karies","html_url":"https://github.com/karies","followers_url":"https://api.github.com/users/karies/followers","following_url":"https://api.github.com/users/karies/following{/other_user}","gists_url":"https://api.github.com/users/karies/gists{/gist_id}","starred_url":"https://api.github.com/users/karies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karies/subscriptions","organizations_url":"https://api.github.com/users/karies/orgs","repos_url":"https://api.github.com/users/karies/repos","events_url":"https://api.github.com/users/karies/events{/privacy}","received_events_url":"https://api.github.com/users/karies/received_events","type":"User","site_admin":false},"body":"I'd prefer to spell out the return type, for three reasons:\r\n- we can :-)\r\n- it's one of the main user interfaces; we should be specific here.\r\n- the error message becomes nicer when calling `Create<T>` with a `T` that is enable_if-ed away by `ToContentType`.\r\nCould you make that change?","created_at":"2016-07-25T09:53:59Z","updated_at":"2016-07-25T09:53:59Z","html_url":"https://github.com/root-mirror/root/pull/205#discussion_r72037066","pull_request_url":"https://api.github.com/repos/root-mirror/root/pulls/205","_links":{"self":{"href":"https://api.github.com/repos/root-mirror/root/pulls/comments/72037066"},"html":{"href":"https://github.com/root-mirror/root/pull/205#discussion_r72037066"},"pull_request":{"href":"https://api.github.com/repos/root-mirror/root/pulls/205"}}},"pull_request":{"url":"https://api.github.com/repos/root-mirror/root/pulls/205","id":78585787,"html_url":"https://github.com/root-mirror/root/pull/205","diff_url":"https://github.com/root-mirror/root/pull/205.diff","patch_url":"https://github.com/root-mirror/root/pull/205.patch","issue_url":"https://api.github.com/repos/root-mirror/root/issues/205","number":205,"state":"open","locked":false,"title":"Rewrite ROOT::Experimental::TDirectory[Entry].h, add cast to base class","user":{"login":"BerserkerTroll","id":20418480,"avatar_url":"https://avatars.githubusercontent.com/u/20418480?v=3","gravatar_id":"","url":"https://api.github.com/users/BerserkerTroll","html_url":"https://github.com/BerserkerTroll","followers_url":"https://api.github.com/users/BerserkerTroll/followers","following_url":"https://api.github.com/users/BerserkerTroll/following{/other_user}","gists_url":"https://api.github.com/users/BerserkerTroll/gists{/gist_id}","starred_url":"https://api.github.com/users/BerserkerTroll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BerserkerTroll/subscriptions","organizations_url":"https://api.github.com/users/BerserkerTroll/orgs","repos_url":"https://api.github.com/users/BerserkerTroll/repos","events_url":"https://api.github.com/users/BerserkerTroll/events{/privacy}","received_events_url":"https://api.github.com/users/BerserkerTroll/received_events","type":"User","site_admin":false},"body":"Based on `TClass::DynamicCast()`.\r\n`root` script to check it working https://gist.github.com/BerserkerTroll/b94c2d3e3a5848be7c7dd53e323e1cdb\r\n\r\nBesides different cast method, some bugs were fixed, so #200 was actually broken, despite it compiles (nobody has instantiated broken templates). Consider @a885623b7f04d193b299097b189bbb1fd45139e1 (exception-based cast, without bugs) if you want to get rid of `TClass` or apply this https://gist.github.com/BerserkerTroll/b6624c5f74b71293bc9c2059b4e5236a patch to this PR.","created_at":"2016-07-24T00:03:37Z","updated_at":"2016-07-25T09:53:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6285bbbeab265f143cd5ff2bd8acf6a581abbfec","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/root-mirror/root/pulls/205/commits","review_comments_url":"https://api.github.com/repos/root-mirror/root/pulls/205/comments","review_comment_url":"https://api.github.com/repos/root-mirror/root/pulls/comments{/number}","comments_url":"https://api.github.com/repos/root-mirror/root/issues/205/comments","statuses_url":"https://api.github.com/repos/root-mirror/root/statuses/8603748a04582eaab521dde3244cff4a54ea8e13","head":{"label":"BerserkerTroll:tdirectoryupcast_nothrow","ref":"tdirectoryupcast_nothrow","sha":"8603748a04582eaab521dde3244cff4a54ea8e13","user":{"login":"BerserkerTroll","id":20418480,"avatar_url":"https://avatars.githubusercontent.com/u/20418480?v=3","gravatar_id":"","url":"https://api.github.com/users/BerserkerTroll","html_url":"https://github.com/BerserkerTroll","followers_url":"https://api.github.com/users/BerserkerTroll/followers","following_url":"https://api.github.com/users/BerserkerTroll/following{/other_user}","gists_url":"https://api.github.com/users/BerserkerTroll/gists{/gist_id}","starred_url":"https://api.github.com/users/BerserkerTroll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BerserkerTroll/subscriptions","organizations_url":"https://api.github.com/users/BerserkerTroll/orgs","repos_url":"https://api.github.com/users/BerserkerTroll/repos","events_url":"https://api.github.com/users/BerserkerTroll/events{/privacy}","received_events_url":"https://api.github.com/users/BerserkerTroll/received_events","type":"User","site_admin":false},"repo":{"id":63151361,"name":"root","full_name":"BerserkerTroll/root","owner":{"login":"BerserkerTroll","id":20418480,"avatar_url":"https://avatars.githubusercontent.com/u/20418480?v=3","gravatar_id":"","url":"https://api.github.com/users/BerserkerTroll","html_url":"https://github.com/BerserkerTroll","followers_url":"https://api.github.com/users/BerserkerTroll/followers","following_url":"https://api.github.com/users/BerserkerTroll/following{/other_user}","gists_url":"https://api.github.com/users/BerserkerTroll/gists{/gist_id}","starred_url":"https://api.github.com/users/BerserkerTroll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BerserkerTroll/subscriptions","organizations_url":"https://api.github.com/users/BerserkerTroll/orgs","repos_url":"https://api.github.com/users/BerserkerTroll/repos","events_url":"https://api.github.com/users/BerserkerTroll/events{/privacy}","received_events_url":"https://api.github.com/users/BerserkerTroll/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BerserkerTroll/root","description":"Mirror of official ROOT git repository","fork":true,"url":"https://api.github.com/repos/BerserkerTroll/root","forks_url":"https://api.github.com/repos/BerserkerTroll/root/forks","keys_url":"https://api.github.com/repos/BerserkerTroll/root/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BerserkerTroll/root/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BerserkerTroll/root/teams","hooks_url":"https://api.github.com/repos/BerserkerTroll/root/hooks","issue_events_url":"https://api.github.com/repos/BerserkerTroll/root/issues/events{/number}","events_url":"https://api.github.com/repos/BerserkerTroll/root/events","assignees_url":"https://api.github.com/repos/BerserkerTroll/root/assignees{/user}","branches_url":"https://api.github.com/repos/BerserkerTroll/root/branches{/branch}","tags_url":"https://api.github.com/repos/BerserkerTroll/root/tags","blobs_url":"https://api.github.com/repos/BerserkerTroll/root/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BerserkerTroll/root/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BerserkerTroll/root/git/refs{/sha}","trees_url":"https://api.github.com/repos/BerserkerTroll/root/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BerserkerTroll/root/statuses/{sha}","languages_url":"https://api.github.com/repos/BerserkerTroll/root/languages","stargazers_url":"https://api.github.com/repos/BerserkerTroll/root/stargazers","contributors_url":"https://api.github.com/repos/BerserkerTroll/root/contributors","subscribers_url":"https://api.github.com/repos/BerserkerTroll/root/subscribers","subscription_url":"https://api.github.com/repos/BerserkerTroll/root/subscription","commits_url":"https://api.github.com/repos/BerserkerTroll/root/commits{/sha}","git_commits_url":"https://api.github.com/repos/BerserkerTroll/root/git/commits{/sha}","comments_url":"https://api.github.com/repos/BerserkerTroll/root/comments{/number}","issue_comment_url":"https://api.github.com/repos/BerserkerTroll/root/issues/comments{/number}","contents_url":"https://api.github.com/repos/BerserkerTroll/root/contents/{+path}","compare_url":"https://api.github.com/repos/BerserkerTroll/root/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BerserkerTroll/root/merges","archive_url":"https://api.github.com/repos/BerserkerTroll/root/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BerserkerTroll/root/downloads","issues_url":"https://api.github.com/repos/BerserkerTroll/root/issues{/number}","pulls_url":"https://api.github.com/repos/BerserkerTroll/root/pulls{/number}","milestones_url":"https://api.github.com/repos/BerserkerTroll/root/milestones{/number}","notifications_url":"https://api.github.com/repos/BerserkerTroll/root/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BerserkerTroll/root/labels{/name}","releases_url":"https://api.github.com/repos/BerserkerTroll/root/releases{/id}","deployments_url":"https://api.github.com/repos/BerserkerTroll/root/deployments","created_at":"2016-07-12T11:08:07Z","updated_at":"2016-07-12T11:09:06Z","pushed_at":"2016-07-23T22:41:38Z","git_url":"git://github.com/BerserkerTroll/root.git","ssh_url":"git@github.com:BerserkerTroll/root.git","clone_url":"https://github.com/BerserkerTroll/root.git","svn_url":"https://github.com/BerserkerTroll/root","homepage":"http://root.cern.ch","size":581620,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"root-mirror:master","ref":"master","sha":"2102e4b322ae4b81d039db7f37c87acccf5c3400","user":{"login":"root-mirror","id":4849136,"avatar_url":"https://avatars.githubusercontent.com/u/4849136?v=3","gravatar_id":"","url":"https://api.github.com/users/root-mirror","html_url":"https://github.com/root-mirror","followers_url":"https://api.github.com/users/root-mirror/followers","following_url":"https://api.github.com/users/root-mirror/following{/other_user}","gists_url":"https://api.github.com/users/root-mirror/gists{/gist_id}","starred_url":"https://api.github.com/users/root-mirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/root-mirror/subscriptions","organizations_url":"https://api.github.com/users/root-mirror/orgs","repos_url":"https://api.github.com/users/root-mirror/repos","events_url":"https://api.github.com/users/root-mirror/events{/privacy}","received_events_url":"https://api.github.com/users/root-mirror/received_events","type":"Organization","site_admin":false},"repo":{"id":10994345,"name":"root","full_name":"root-mirror/root","owner":{"login":"root-mirror","id":4849136,"avatar_url":"https://avatars.githubusercontent.com/u/4849136?v=3","gravatar_id":"","url":"https://api.github.com/users/root-mirror","html_url":"https://github.com/root-mirror","followers_url":"https://api.github.com/users/root-mirror/followers","following_url":"https://api.github.com/users/root-mirror/following{/other_user}","gists_url":"https://api.github.com/users/root-mirror/gists{/gist_id}","starred_url":"https://api.github.com/users/root-mirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/root-mirror/subscriptions","organizations_url":"https://api.github.com/users/root-mirror/orgs","repos_url":"https://api.github.com/users/root-mirror/repos","events_url":"https://api.github.com/users/root-mirror/events{/privacy}","received_events_url":"https://api.github.com/users/root-mirror/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/root-mirror/root","description":"Mirror of official ROOT git repository","fork":false,"url":"https://api.github.com/repos/root-mirror/root","forks_url":"https://api.github.com/repos/root-mirror/root/forks","keys_url":"https://api.github.com/repos/root-mirror/root/keys{/key_id}","collaborators_url":"https://api.github.com/repos/root-mirror/root/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/root-mirror/root/teams","hooks_url":"https://api.github.com/repos/root-mirror/root/hooks","issue_events_url":"https://api.github.com/repos/root-mirror/root/issues/events{/number}","events_url":"https://api.github.com/repos/root-mirror/root/events","assignees_url":"https://api.github.com/repos/root-mirror/root/assignees{/user}","branches_url":"https://api.github.com/repos/root-mirror/root/branches{/branch}","tags_url":"https://api.github.com/repos/root-mirror/root/tags","blobs_url":"https://api.github.com/repos/root-mirror/root/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/root-mirror/root/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/root-mirror/root/git/refs{/sha}","trees_url":"https://api.github.com/repos/root-mirror/root/git/trees{/sha}","statuses_url":"https://api.github.com/repos/root-mirror/root/statuses/{sha}","languages_url":"https://api.github.com/repos/root-mirror/root/languages","stargazers_url":"https://api.github.com/repos/root-mirror/root/stargazers","contributors_url":"https://api.github.com/repos/root-mirror/root/contributors","subscribers_url":"https://api.github.com/repos/root-mirror/root/subscribers","subscription_url":"https://api.github.com/repos/root-mirror/root/subscription","commits_url":"https://api.github.com/repos/root-mirror/root/commits{/sha}","git_commits_url":"https://api.github.com/repos/root-mirror/root/git/commits{/sha}","comments_url":"https://api.github.com/repos/root-mirror/root/comments{/number}","issue_comment_url":"https://api.github.com/repos/root-mirror/root/issues/comments{/number}","contents_url":"https://api.github.com/repos/root-mirror/root/contents/{+path}","compare_url":"https://api.github.com/repos/root-mirror/root/compare/{base}...{head}","merges_url":"https://api.github.com/repos/root-mirror/root/merges","archive_url":"https://api.github.com/repos/root-mirror/root/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/root-mirror/root/downloads","issues_url":"https://api.github.com/repos/root-mirror/root/issues{/number}","pulls_url":"https://api.github.com/repos/root-mirror/root/pulls{/number}","milestones_url":"https://api.github.com/repos/root-mirror/root/milestones{/number}","notifications_url":"https://api.github.com/repos/root-mirror/root/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/root-mirror/root/labels{/name}","releases_url":"https://api.github.com/repos/root-mirror/root/releases{/id}","deployments_url":"https://api.github.com/repos/root-mirror/root/deployments","created_at":"2013-06-27T10:46:59Z","updated_at":"2016-07-23T18:44:34Z","pushed_at":"2016-07-25T09:42:33Z","git_url":"git://github.com/root-mirror/root.git","ssh_url":"git@github.com:root-mirror/root.git","clone_url":"https://github.com/root-mirror/root.git","svn_url":"https://github.com/root-mirror/root","homepage":"http://root.cern.ch","size":607617,"stargazers_count":215,"watchers_count":215,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":171,"mirror_url":null,"open_issues_count":29,"forks":171,"open_issues":29,"watchers":215,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/root-mirror/root/pulls/205"},"html":{"href":"https://github.com/root-mirror/root/pull/205"},"issue":{"href":"https://api.github.com/repos/root-mirror/root/issues/205"},"comments":{"href":"https://api.github.com/repos/root-mirror/root/issues/205/comments"},"review_comments":{"href":"https://api.github.com/repos/root-mirror/root/pulls/205/comments"},"review_comment":{"href":"https://api.github.com/repos/root-mirror/root/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/root-mirror/root/pulls/205/commits"},"statuses":{"href":"https://api.github.com/repos/root-mirror/root/statuses/8603748a04582eaab521dde3244cff4a54ea8e13"}}}}
{"actor":{"display_login":"karies"}}