{"action":"created","comment":{"url":"https://api.github.com/repos/QuantStack/xtensor/pulls/comments/105825402","pull_request_review_id":26721679,"id":105825402,"diff_hunk":"@@ -384,22 +397,25 @@ namespace xt\n      //@{\n      /**\n       * Constructs an xreducer expression applying the specified\n-      * function to the given expression over the given axis.\n+      * function to the given expression over the given axes.\n       *\n       * @param func the function to apply\n       * @param e the expression to reduce\n-      * @param axis the axis along which the reduction is performed\n+      * @param axes the axes along which the reduction is performed\n       */\n     template <class F, class CT, class X>\n-    template <class Func>\n-    inline xreducer<F, CT, X>::xreducer(Func&& func, CT e, const axis_storage& axis)\n-        : m_e(e), m_f(std::forward<Func>(func)), m_axis(axis),\n-          m_shape(make_sequence<shape_type>(m_e.dimension() - axis.size(), 0)),\n+    template <class Func, class AX>\n+    inline xreducer<F, CT, X>::xreducer(Func&& func, CT e, AX&& axes)\n+        : m_e(e), m_f(std::forward<Func>(func)), m_axes(axes),\n+          m_shape(make_sequence<shape_type>(m_e.dimension() - axes.size(), 0)),","path":"include/xtensor/xreducer.hpp","position":174,"original_position":174,"commit_id":"b00e9f5e689a081153abd03666a10b6f8f269800","original_commit_id":"b00e9f5e689a081153abd03666a10b6f8f269800","user":{"login":"JohanMabille","id":6754742,"avatar_url":"https://avatars3.githubusercontent.com/u/6754742?v=3","gravatar_id":"","url":"https://api.github.com/users/JohanMabille","html_url":"https://github.com/JohanMabille","followers_url":"https://api.github.com/users/JohanMabille/followers","following_url":"https://api.github.com/users/JohanMabille/following{/other_user}","gists_url":"https://api.github.com/users/JohanMabille/gists{/gist_id}","starred_url":"https://api.github.com/users/JohanMabille/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohanMabille/subscriptions","organizations_url":"https://api.github.com/users/JohanMabille/orgs","repos_url":"https://api.github.com/users/JohanMabille/repos","events_url":"https://api.github.com/users/JohanMabille/events{/privacy}","received_events_url":"https://api.github.com/users/JohanMabille/received_events","type":"User","site_admin":false},"body":"If you forward ``axes``, you should use to ``m_axes.size()`` instead of ``axes.size()`` to avoid dangling reference when ``axes`` is moved. Note the standard ensure ``m_axes`` will be initialized before ``m_shape`` since it appears before in the class definition.","created_at":"2017-03-14T04:20:48Z","updated_at":"2017-03-14T04:21:40Z","html_url":"https://github.com/QuantStack/xtensor/pull/174#discussion_r105825402","pull_request_url":"https://api.github.com/repos/QuantStack/xtensor/pulls/174","_links":{"self":{"href":"https://api.github.com/repos/QuantStack/xtensor/pulls/comments/105825402"},"html":{"href":"https://github.com/QuantStack/xtensor/pull/174#discussion_r105825402"},"pull_request":{"href":"https://api.github.com/repos/QuantStack/xtensor/pulls/174"}}},"pull_request":{"url":"https://api.github.com/repos/QuantStack/xtensor/pulls/174","id":110525074,"html_url":"https://github.com/QuantStack/xtensor/pull/174","diff_url":"https://github.com/QuantStack/xtensor/pull/174.diff","patch_url":"https://github.com/QuantStack/xtensor/pull/174.patch","issue_url":"https://api.github.com/repos/QuantStack/xtensor/issues/174","number":174,"state":"open","locked":false,"title":"Move semantic with xreducer axes","user":{"login":"SylvainCorlay","id":2397974,"avatar_url":"https://avatars3.githubusercontent.com/u/2397974?v=3","gravatar_id":"","url":"https://api.github.com/users/SylvainCorlay","html_url":"https://github.com/SylvainCorlay","followers_url":"https://api.github.com/users/SylvainCorlay/followers","following_url":"https://api.github.com/users/SylvainCorlay/following{/other_user}","gists_url":"https://api.github.com/users/SylvainCorlay/gists{/gist_id}","starred_url":"https://api.github.com/users/SylvainCorlay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SylvainCorlay/subscriptions","organizations_url":"https://api.github.com/users/SylvainCorlay/orgs","repos_url":"https://api.github.com/users/SylvainCorlay/repos","events_url":"https://api.github.com/users/SylvainCorlay/events{/privacy}","received_events_url":"https://api.github.com/users/SylvainCorlay/received_events","type":"User","site_admin":false},"body":"- Now storing a closure type on the axes sequence.\r\n- The list of axes now must be sorted.","created_at":"2017-03-14T00:20:28Z","updated_at":"2017-03-14T04:21:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0442f4eec839d2e245c88df5a4af081b66584ed9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/QuantStack/xtensor/pulls/174/commits","review_comments_url":"https://api.github.com/repos/QuantStack/xtensor/pulls/174/comments","review_comment_url":"https://api.github.com/repos/QuantStack/xtensor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/QuantStack/xtensor/issues/174/comments","statuses_url":"https://api.github.com/repos/QuantStack/xtensor/statuses/b00e9f5e689a081153abd03666a10b6f8f269800","head":{"label":"SylvainCorlay:reducer-closure_axes","ref":"reducer-closure_axes","sha":"b00e9f5e689a081153abd03666a10b6f8f269800","user":{"login":"SylvainCorlay","id":2397974,"avatar_url":"https://avatars3.githubusercontent.com/u/2397974?v=3","gravatar_id":"","url":"https://api.github.com/users/SylvainCorlay","html_url":"https://github.com/SylvainCorlay","followers_url":"https://api.github.com/users/SylvainCorlay/followers","following_url":"https://api.github.com/users/SylvainCorlay/following{/other_user}","gists_url":"https://api.github.com/users/SylvainCorlay/gists{/gist_id}","starred_url":"https://api.github.com/users/SylvainCorlay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SylvainCorlay/subscriptions","organizations_url":"https://api.github.com/users/SylvainCorlay/orgs","repos_url":"https://api.github.com/users/SylvainCorlay/repos","events_url":"https://api.github.com/users/SylvainCorlay/events{/privacy}","received_events_url":"https://api.github.com/users/SylvainCorlay/received_events","type":"User","site_admin":false},"repo":{"id":72729213,"name":"xtensor","full_name":"SylvainCorlay/xtensor","owner":{"login":"SylvainCorlay","id":2397974,"avatar_url":"https://avatars3.githubusercontent.com/u/2397974?v=3","gravatar_id":"","url":"https://api.github.com/users/SylvainCorlay","html_url":"https://github.com/SylvainCorlay","followers_url":"https://api.github.com/users/SylvainCorlay/followers","following_url":"https://api.github.com/users/SylvainCorlay/following{/other_user}","gists_url":"https://api.github.com/users/SylvainCorlay/gists{/gist_id}","starred_url":"https://api.github.com/users/SylvainCorlay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SylvainCorlay/subscriptions","organizations_url":"https://api.github.com/users/SylvainCorlay/orgs","repos_url":"https://api.github.com/users/SylvainCorlay/repos","events_url":"https://api.github.com/users/SylvainCorlay/events{/privacy}","received_events_url":"https://api.github.com/users/SylvainCorlay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SylvainCorlay/xtensor","description":"Multi-dimensional Arrays with Broadcasting and Lazy Computing","fork":true,"url":"https://api.github.com/repos/SylvainCorlay/xtensor","forks_url":"https://api.github.com/repos/SylvainCorlay/xtensor/forks","keys_url":"https://api.github.com/repos/SylvainCorlay/xtensor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SylvainCorlay/xtensor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SylvainCorlay/xtensor/teams","hooks_url":"https://api.github.com/repos/SylvainCorlay/xtensor/hooks","issue_events_url":"https://api.github.com/repos/SylvainCorlay/xtensor/issues/events{/number}","events_url":"https://api.github.com/repos/SylvainCorlay/xtensor/events","assignees_url":"https://api.github.com/repos/SylvainCorlay/xtensor/assignees{/user}","branches_url":"https://api.github.com/repos/SylvainCorlay/xtensor/branches{/branch}","tags_url":"https://api.github.com/repos/SylvainCorlay/xtensor/tags","blobs_url":"https://api.github.com/repos/SylvainCorlay/xtensor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SylvainCorlay/xtensor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SylvainCorlay/xtensor/git/refs{/sha}","trees_url":"https://api.github.com/repos/SylvainCorlay/xtensor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SylvainCorlay/xtensor/statuses/{sha}","languages_url":"https://api.github.com/repos/SylvainCorlay/xtensor/languages","stargazers_url":"https://api.github.com/repos/SylvainCorlay/xtensor/stargazers","contributors_url":"https://api.github.com/repos/SylvainCorlay/xtensor/contributors","subscribers_url":"https://api.github.com/repos/SylvainCorlay/xtensor/subscribers","subscription_url":"https://api.github.com/repos/SylvainCorlay/xtensor/subscription","commits_url":"https://api.github.com/repos/SylvainCorlay/xtensor/commits{/sha}","git_commits_url":"https://api.github.com/repos/SylvainCorlay/xtensor/git/commits{/sha}","comments_url":"https://api.github.com/repos/SylvainCorlay/xtensor/comments{/number}","issue_comment_url":"https://api.github.com/repos/SylvainCorlay/xtensor/issues/comments{/number}","contents_url":"https://api.github.com/repos/SylvainCorlay/xtensor/contents/{+path}","compare_url":"https://api.github.com/repos/SylvainCorlay/xtensor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SylvainCorlay/xtensor/merges","archive_url":"https://api.github.com/repos/SylvainCorlay/xtensor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SylvainCorlay/xtensor/downloads","issues_url":"https://api.github.com/repos/SylvainCorlay/xtensor/issues{/number}","pulls_url":"https://api.github.com/repos/SylvainCorlay/xtensor/pulls{/number}","milestones_url":"https://api.github.com/repos/SylvainCorlay/xtensor/milestones{/number}","notifications_url":"https://api.github.com/repos/SylvainCorlay/xtensor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SylvainCorlay/xtensor/labels{/name}","releases_url":"https://api.github.com/repos/SylvainCorlay/xtensor/releases{/id}","deployments_url":"https://api.github.com/repos/SylvainCorlay/xtensor/deployments","created_at":"2016-11-03T09:27:29Z","updated_at":"2016-11-05T10:26:51Z","pushed_at":"2017-03-14T00:46:28Z","git_url":"git://github.com/SylvainCorlay/xtensor.git","ssh_url":"git@github.com:SylvainCorlay/xtensor.git","clone_url":"https://github.com/SylvainCorlay/xtensor.git","svn_url":"https://github.com/SylvainCorlay/xtensor","homepage":null,"size":1102,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"QuantStack:master","ref":"master","sha":"0fa8d5ba1781eec7d978cd5fbd0d34211705c828","user":{"login":"QuantStack","id":19627246,"avatar_url":"https://avatars2.githubusercontent.com/u/19627246?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantStack","html_url":"https://github.com/QuantStack","followers_url":"https://api.github.com/users/QuantStack/followers","following_url":"https://api.github.com/users/QuantStack/following{/other_user}","gists_url":"https://api.github.com/users/QuantStack/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantStack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantStack/subscriptions","organizations_url":"https://api.github.com/users/QuantStack/orgs","repos_url":"https://api.github.com/users/QuantStack/repos","events_url":"https://api.github.com/users/QuantStack/events{/privacy}","received_events_url":"https://api.github.com/users/QuantStack/received_events","type":"Organization","site_admin":false},"repo":{"id":72343220,"name":"xtensor","full_name":"QuantStack/xtensor","owner":{"login":"QuantStack","id":19627246,"avatar_url":"https://avatars2.githubusercontent.com/u/19627246?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantStack","html_url":"https://github.com/QuantStack","followers_url":"https://api.github.com/users/QuantStack/followers","following_url":"https://api.github.com/users/QuantStack/following{/other_user}","gists_url":"https://api.github.com/users/QuantStack/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantStack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantStack/subscriptions","organizations_url":"https://api.github.com/users/QuantStack/orgs","repos_url":"https://api.github.com/users/QuantStack/repos","events_url":"https://api.github.com/users/QuantStack/events{/privacy}","received_events_url":"https://api.github.com/users/QuantStack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/QuantStack/xtensor","description":"Multi-dimensional arrays with broadcasting and lazy computing","fork":false,"url":"https://api.github.com/repos/QuantStack/xtensor","forks_url":"https://api.github.com/repos/QuantStack/xtensor/forks","keys_url":"https://api.github.com/repos/QuantStack/xtensor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QuantStack/xtensor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QuantStack/xtensor/teams","hooks_url":"https://api.github.com/repos/QuantStack/xtensor/hooks","issue_events_url":"https://api.github.com/repos/QuantStack/xtensor/issues/events{/number}","events_url":"https://api.github.com/repos/QuantStack/xtensor/events","assignees_url":"https://api.github.com/repos/QuantStack/xtensor/assignees{/user}","branches_url":"https://api.github.com/repos/QuantStack/xtensor/branches{/branch}","tags_url":"https://api.github.com/repos/QuantStack/xtensor/tags","blobs_url":"https://api.github.com/repos/QuantStack/xtensor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QuantStack/xtensor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QuantStack/xtensor/git/refs{/sha}","trees_url":"https://api.github.com/repos/QuantStack/xtensor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QuantStack/xtensor/statuses/{sha}","languages_url":"https://api.github.com/repos/QuantStack/xtensor/languages","stargazers_url":"https://api.github.com/repos/QuantStack/xtensor/stargazers","contributors_url":"https://api.github.com/repos/QuantStack/xtensor/contributors","subscribers_url":"https://api.github.com/repos/QuantStack/xtensor/subscribers","subscription_url":"https://api.github.com/repos/QuantStack/xtensor/subscription","commits_url":"https://api.github.com/repos/QuantStack/xtensor/commits{/sha}","git_commits_url":"https://api.github.com/repos/QuantStack/xtensor/git/commits{/sha}","comments_url":"https://api.github.com/repos/QuantStack/xtensor/comments{/number}","issue_comment_url":"https://api.github.com/repos/QuantStack/xtensor/issues/comments{/number}","contents_url":"https://api.github.com/repos/QuantStack/xtensor/contents/{+path}","compare_url":"https://api.github.com/repos/QuantStack/xtensor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QuantStack/xtensor/merges","archive_url":"https://api.github.com/repos/QuantStack/xtensor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QuantStack/xtensor/downloads","issues_url":"https://api.github.com/repos/QuantStack/xtensor/issues{/number}","pulls_url":"https://api.github.com/repos/QuantStack/xtensor/pulls{/number}","milestones_url":"https://api.github.com/repos/QuantStack/xtensor/milestones{/number}","notifications_url":"https://api.github.com/repos/QuantStack/xtensor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QuantStack/xtensor/labels{/name}","releases_url":"https://api.github.com/repos/QuantStack/xtensor/releases{/id}","deployments_url":"https://api.github.com/repos/QuantStack/xtensor/deployments","created_at":"2016-10-30T10:40:13Z","updated_at":"2017-03-08T03:42:37Z","pushed_at":"2017-03-14T04:15:08Z","git_url":"git://github.com/QuantStack/xtensor.git","ssh_url":"git@github.com:QuantStack/xtensor.git","clone_url":"https://github.com/QuantStack/xtensor.git","svn_url":"https://github.com/QuantStack/xtensor","homepage":"http://quantstack.net/xtensor","size":1106,"stargazers_count":116,"watchers_count":116,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":11,"forks":9,"open_issues":11,"watchers":116,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/QuantStack/xtensor/pulls/174"},"html":{"href":"https://github.com/QuantStack/xtensor/pull/174"},"issue":{"href":"https://api.github.com/repos/QuantStack/xtensor/issues/174"},"comments":{"href":"https://api.github.com/repos/QuantStack/xtensor/issues/174/comments"},"review_comments":{"href":"https://api.github.com/repos/QuantStack/xtensor/pulls/174/comments"},"review_comment":{"href":"https://api.github.com/repos/QuantStack/xtensor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/QuantStack/xtensor/pulls/174/commits"},"statuses":{"href":"https://api.github.com/repos/QuantStack/xtensor/statuses/b00e9f5e689a081153abd03666a10b6f8f269800"}}}}
{"actor":{"display_login":"JohanMabille"}}