{"action":"created","comment":{"url":"https://api.github.com/repos/NVIDIA/DALI/pulls/comments/315630577","pull_request_review_id":277090223,"id":315630577,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMxNTYzMDU3Nw==","diff_hunk":"@@ -0,0 +1,54 @@\n+// Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//     http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.#ifndef DALI_MAKE_STRING_H\n+\n+#ifndef DALI_UTIL_MAKE_STRING_H_\n+#define DALI_UTIL_MAKE_STRING_H_\n+\n+#include <string>\n+\n+namespace dali {\n+\n+namespace detail {\n+\n+template <class T>\n+std::string make_string(std::stringstream &ss, const T &val) {\n+  ss << val;\n+  return ss.str();\n+}\n+\n+\n+template <class T, class... Args>\n+std::string make_string(std::stringstream &ss, const T &val, const Args &... args) {\n+  ss << val;","path":"dali/util/make_string.h","position":33,"original_position":33,"commit_id":"0d419a80643cc1e0d9431eea339fde65dbb5d16d","original_commit_id":"0d419a80643cc1e0d9431eea339fde65dbb5d16d","user":{"login":"JanuszL","id":39967756,"node_id":"MDQ6VXNlcjM5OTY3NzU2","avatar_url":"https://avatars1.githubusercontent.com/u/39967756?v=4","gravatar_id":"","url":"https://api.github.com/users/JanuszL","html_url":"https://github.com/JanuszL","followers_url":"https://api.github.com/users/JanuszL/followers","following_url":"https://api.github.com/users/JanuszL/following{/other_user}","gists_url":"https://api.github.com/users/JanuszL/gists{/gist_id}","starred_url":"https://api.github.com/users/JanuszL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JanuszL/subscriptions","organizations_url":"https://api.github.com/users/JanuszL/orgs","repos_url":"https://api.github.com/users/JanuszL/repos","events_url":"https://api.github.com/users/JanuszL/events{/privacy}","received_events_url":"https://api.github.com/users/JanuszL/received_events","type":"User","site_admin":false},"body":"If `vec<3>` needs to be printed then the delimiter is more than welcome. But in case of `make_string(\"Images don't have matching number of channels, expected \", x, \" found \", y, \".\");` rather not.\r\nHow about two variants:\r\n* `make_string` without delimiter\r\n* `make_string_delim` with delimeter\r\n?","created_at":"2019-08-20T11:07:59Z","updated_at":"2019-08-20T11:07:59Z","html_url":"https://github.com/NVIDIA/DALI/pull/1174#discussion_r315630577","pull_request_url":"https://api.github.com/repos/NVIDIA/DALI/pulls/1174","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/NVIDIA/DALI/pulls/comments/315630577"},"html":{"href":"https://github.com/NVIDIA/DALI/pull/1174#discussion_r315630577"},"pull_request":{"href":"https://api.github.com/repos/NVIDIA/DALI/pulls/1174"}},"in_reply_to_id":314753711},"pull_request":{"url":"https://api.github.com/repos/NVIDIA/DALI/pulls/1174","id":308100913,"node_id":"MDExOlB1bGxSZXF1ZXN0MzA4MTAwOTEz","html_url":"https://github.com/NVIDIA/DALI/pull/1174","diff_url":"https://github.com/NVIDIA/DALI/pull/1174.diff","patch_url":"https://github.com/NVIDIA/DALI/pull/1174.patch","issue_url":"https://api.github.com/repos/NVIDIA/DALI/issues/1174","number":1174,"state":"open","locked":false,"title":"make_string for arguments, which have `operator<<`","user":{"login":"szalpal","id":7101064,"node_id":"MDQ6VXNlcjcxMDEwNjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/7101064?v=4","gravatar_id":"","url":"https://api.github.com/users/szalpal","html_url":"https://github.com/szalpal","followers_url":"https://api.github.com/users/szalpal/followers","following_url":"https://api.github.com/users/szalpal/following{/other_user}","gists_url":"https://api.github.com/users/szalpal/gists{/gist_id}","starred_url":"https://api.github.com/users/szalpal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szalpal/subscriptions","organizations_url":"https://api.github.com/users/szalpal/orgs","repos_url":"https://api.github.com/users/szalpal/repos","events_url":"https://api.github.com/users/szalpal/events{/privacy}","received_events_url":"https://api.github.com/users/szalpal/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Michał Szołucha <mszolucha@nvidia.com>\r\n\r\n#### Why we need this PR?\r\n*Pick one*\r\n- It adds new feature: creating a function-like string for bunch of arguments, which have only `operator<<`\r\n\r\nWe need it, because with it we can do like:\r\n```\r\nvec<3> v={1,2,3}\r\nDALI_ENFORCE(something, make_string(\"Failed because of: \", v));\r\n```\r\nSince we can't do `std::to_string(v)` and polluting `std` with custom overload of `to_string` seems like ugly solution.","created_at":"2019-08-16T14:36:49Z","updated_at":"2019-08-20T11:07:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7428e891a43fe19eb588a9ca5faa9a8a2565f6a0","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jantonguirao","id":3891217,"node_id":"MDQ6VXNlcjM4OTEyMTc=","avatar_url":"https://avatars3.githubusercontent.com/u/3891217?v=4","gravatar_id":"","url":"https://api.github.com/users/jantonguirao","html_url":"https://github.com/jantonguirao","followers_url":"https://api.github.com/users/jantonguirao/followers","following_url":"https://api.github.com/users/jantonguirao/following{/other_user}","gists_url":"https://api.github.com/users/jantonguirao/gists{/gist_id}","starred_url":"https://api.github.com/users/jantonguirao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jantonguirao/subscriptions","organizations_url":"https://api.github.com/users/jantonguirao/orgs","repos_url":"https://api.github.com/users/jantonguirao/repos","events_url":"https://api.github.com/users/jantonguirao/events{/privacy}","received_events_url":"https://api.github.com/users/jantonguirao/received_events","type":"User","site_admin":false},{"login":"klecki","id":8121971,"node_id":"MDQ6VXNlcjgxMjE5NzE=","avatar_url":"https://avatars3.githubusercontent.com/u/8121971?v=4","gravatar_id":"","url":"https://api.github.com/users/klecki","html_url":"https://github.com/klecki","followers_url":"https://api.github.com/users/klecki/followers","following_url":"https://api.github.com/users/klecki/following{/other_user}","gists_url":"https://api.github.com/users/klecki/gists{/gist_id}","starred_url":"https://api.github.com/users/klecki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klecki/subscriptions","organizations_url":"https://api.github.com/users/klecki/orgs","repos_url":"https://api.github.com/users/klecki/repos","events_url":"https://api.github.com/users/klecki/events{/privacy}","received_events_url":"https://api.github.com/users/klecki/received_events","type":"User","site_admin":false},{"login":"JanuszL","id":39967756,"node_id":"MDQ6VXNlcjM5OTY3NzU2","avatar_url":"https://avatars1.githubusercontent.com/u/39967756?v=4","gravatar_id":"","url":"https://api.github.com/users/JanuszL","html_url":"https://github.com/JanuszL","followers_url":"https://api.github.com/users/JanuszL/followers","following_url":"https://api.github.com/users/JanuszL/following{/other_user}","gists_url":"https://api.github.com/users/JanuszL/gists{/gist_id}","starred_url":"https://api.github.com/users/JanuszL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JanuszL/subscriptions","organizations_url":"https://api.github.com/users/JanuszL/orgs","repos_url":"https://api.github.com/users/JanuszL/repos","events_url":"https://api.github.com/users/JanuszL/events{/privacy}","received_events_url":"https://api.github.com/users/JanuszL/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/NVIDIA/DALI/pulls/1174/commits","review_comments_url":"https://api.github.com/repos/NVIDIA/DALI/pulls/1174/comments","review_comment_url":"https://api.github.com/repos/NVIDIA/DALI/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NVIDIA/DALI/issues/1174/comments","statuses_url":"https://api.github.com/repos/NVIDIA/DALI/statuses/0d419a80643cc1e0d9431eea339fde65dbb5d16d","head":{"label":"szalpal:make_string","ref":"make_string","sha":"0d419a80643cc1e0d9431eea339fde65dbb5d16d","user":{"login":"szalpal","id":7101064,"node_id":"MDQ6VXNlcjcxMDEwNjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/7101064?v=4","gravatar_id":"","url":"https://api.github.com/users/szalpal","html_url":"https://github.com/szalpal","followers_url":"https://api.github.com/users/szalpal/followers","following_url":"https://api.github.com/users/szalpal/following{/other_user}","gists_url":"https://api.github.com/users/szalpal/gists{/gist_id}","starred_url":"https://api.github.com/users/szalpal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szalpal/subscriptions","organizations_url":"https://api.github.com/users/szalpal/orgs","repos_url":"https://api.github.com/users/szalpal/repos","events_url":"https://api.github.com/users/szalpal/events{/privacy}","received_events_url":"https://api.github.com/users/szalpal/received_events","type":"User","site_admin":false},"repo":{"id":148139188,"node_id":"MDEwOlJlcG9zaXRvcnkxNDgxMzkxODg=","name":"DALI","full_name":"szalpal/DALI","private":false,"owner":{"login":"szalpal","id":7101064,"node_id":"MDQ6VXNlcjcxMDEwNjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/7101064?v=4","gravatar_id":"","url":"https://api.github.com/users/szalpal","html_url":"https://github.com/szalpal","followers_url":"https://api.github.com/users/szalpal/followers","following_url":"https://api.github.com/users/szalpal/following{/other_user}","gists_url":"https://api.github.com/users/szalpal/gists{/gist_id}","starred_url":"https://api.github.com/users/szalpal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szalpal/subscriptions","organizations_url":"https://api.github.com/users/szalpal/orgs","repos_url":"https://api.github.com/users/szalpal/repos","events_url":"https://api.github.com/users/szalpal/events{/privacy}","received_events_url":"https://api.github.com/users/szalpal/received_events","type":"User","site_admin":false},"html_url":"https://github.com/szalpal/DALI","description":"A library containing both highly optimized building blocks and an execution engine for data pre-processing in deep learning applications","fork":true,"url":"https://api.github.com/repos/szalpal/DALI","forks_url":"https://api.github.com/repos/szalpal/DALI/forks","keys_url":"https://api.github.com/repos/szalpal/DALI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/szalpal/DALI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/szalpal/DALI/teams","hooks_url":"https://api.github.com/repos/szalpal/DALI/hooks","issue_events_url":"https://api.github.com/repos/szalpal/DALI/issues/events{/number}","events_url":"https://api.github.com/repos/szalpal/DALI/events","assignees_url":"https://api.github.com/repos/szalpal/DALI/assignees{/user}","branches_url":"https://api.github.com/repos/szalpal/DALI/branches{/branch}","tags_url":"https://api.github.com/repos/szalpal/DALI/tags","blobs_url":"https://api.github.com/repos/szalpal/DALI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/szalpal/DALI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/szalpal/DALI/git/refs{/sha}","trees_url":"https://api.github.com/repos/szalpal/DALI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/szalpal/DALI/statuses/{sha}","languages_url":"https://api.github.com/repos/szalpal/DALI/languages","stargazers_url":"https://api.github.com/repos/szalpal/DALI/stargazers","contributors_url":"https://api.github.com/repos/szalpal/DALI/contributors","subscribers_url":"https://api.github.com/repos/szalpal/DALI/subscribers","subscription_url":"https://api.github.com/repos/szalpal/DALI/subscription","commits_url":"https://api.github.com/repos/szalpal/DALI/commits{/sha}","git_commits_url":"https://api.github.com/repos/szalpal/DALI/git/commits{/sha}","comments_url":"https://api.github.com/repos/szalpal/DALI/comments{/number}","issue_comment_url":"https://api.github.com/repos/szalpal/DALI/issues/comments{/number}","contents_url":"https://api.github.com/repos/szalpal/DALI/contents/{+path}","compare_url":"https://api.github.com/repos/szalpal/DALI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/szalpal/DALI/merges","archive_url":"https://api.github.com/repos/szalpal/DALI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/szalpal/DALI/downloads","issues_url":"https://api.github.com/repos/szalpal/DALI/issues{/number}","pulls_url":"https://api.github.com/repos/szalpal/DALI/pulls{/number}","milestones_url":"https://api.github.com/repos/szalpal/DALI/milestones{/number}","notifications_url":"https://api.github.com/repos/szalpal/DALI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/szalpal/DALI/labels{/name}","releases_url":"https://api.github.com/repos/szalpal/DALI/releases{/id}","deployments_url":"https://api.github.com/repos/szalpal/DALI/deployments","created_at":"2018-09-10T10:33:14Z","updated_at":"2019-06-19T10:38:41Z","pushed_at":"2019-08-19T14:07:16Z","git_url":"git://github.com/szalpal/DALI.git","ssh_url":"git@github.com:szalpal/DALI.git","clone_url":"https://github.com/szalpal/DALI.git","svn_url":"https://github.com/szalpal/DALI","homepage":"https://docs.nvidia.com/deeplearning/sdk/dali-developer-guide/index.html","size":82938,"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":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"NVIDIA:master","ref":"master","sha":"1900068003fd1f3f419e0ae97fa17e5e4b59a982","user":{"login":"NVIDIA","id":1728152,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MjgxNTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1728152?v=4","gravatar_id":"","url":"https://api.github.com/users/NVIDIA","html_url":"https://github.com/NVIDIA","followers_url":"https://api.github.com/users/NVIDIA/followers","following_url":"https://api.github.com/users/NVIDIA/following{/other_user}","gists_url":"https://api.github.com/users/NVIDIA/gists{/gist_id}","starred_url":"https://api.github.com/users/NVIDIA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NVIDIA/subscriptions","organizations_url":"https://api.github.com/users/NVIDIA/orgs","repos_url":"https://api.github.com/users/NVIDIA/repos","events_url":"https://api.github.com/users/NVIDIA/events{/privacy}","received_events_url":"https://api.github.com/users/NVIDIA/received_events","type":"Organization","site_admin":false},"repo":{"id":135768037,"node_id":"MDEwOlJlcG9zaXRvcnkxMzU3NjgwMzc=","name":"DALI","full_name":"NVIDIA/DALI","private":false,"owner":{"login":"NVIDIA","id":1728152,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MjgxNTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1728152?v=4","gravatar_id":"","url":"https://api.github.com/users/NVIDIA","html_url":"https://github.com/NVIDIA","followers_url":"https://api.github.com/users/NVIDIA/followers","following_url":"https://api.github.com/users/NVIDIA/following{/other_user}","gists_url":"https://api.github.com/users/NVIDIA/gists{/gist_id}","starred_url":"https://api.github.com/users/NVIDIA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NVIDIA/subscriptions","organizations_url":"https://api.github.com/users/NVIDIA/orgs","repos_url":"https://api.github.com/users/NVIDIA/repos","events_url":"https://api.github.com/users/NVIDIA/events{/privacy}","received_events_url":"https://api.github.com/users/NVIDIA/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/NVIDIA/DALI","description":"A library containing both highly optimized building blocks and an execution engine for data pre-processing in deep learning applications","fork":false,"url":"https://api.github.com/repos/NVIDIA/DALI","forks_url":"https://api.github.com/repos/NVIDIA/DALI/forks","keys_url":"https://api.github.com/repos/NVIDIA/DALI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NVIDIA/DALI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NVIDIA/DALI/teams","hooks_url":"https://api.github.com/repos/NVIDIA/DALI/hooks","issue_events_url":"https://api.github.com/repos/NVIDIA/DALI/issues/events{/number}","events_url":"https://api.github.com/repos/NVIDIA/DALI/events","assignees_url":"https://api.github.com/repos/NVIDIA/DALI/assignees{/user}","branches_url":"https://api.github.com/repos/NVIDIA/DALI/branches{/branch}","tags_url":"https://api.github.com/repos/NVIDIA/DALI/tags","blobs_url":"https://api.github.com/repos/NVIDIA/DALI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NVIDIA/DALI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NVIDIA/DALI/git/refs{/sha}","trees_url":"https://api.github.com/repos/NVIDIA/DALI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NVIDIA/DALI/statuses/{sha}","languages_url":"https://api.github.com/repos/NVIDIA/DALI/languages","stargazers_url":"https://api.github.com/repos/NVIDIA/DALI/stargazers","contributors_url":"https://api.github.com/repos/NVIDIA/DALI/contributors","subscribers_url":"https://api.github.com/repos/NVIDIA/DALI/subscribers","subscription_url":"https://api.github.com/repos/NVIDIA/DALI/subscription","commits_url":"https://api.github.com/repos/NVIDIA/DALI/commits{/sha}","git_commits_url":"https://api.github.com/repos/NVIDIA/DALI/git/commits{/sha}","comments_url":"https://api.github.com/repos/NVIDIA/DALI/comments{/number}","issue_comment_url":"https://api.github.com/repos/NVIDIA/DALI/issues/comments{/number}","contents_url":"https://api.github.com/repos/NVIDIA/DALI/contents/{+path}","compare_url":"https://api.github.com/repos/NVIDIA/DALI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NVIDIA/DALI/merges","archive_url":"https://api.github.com/repos/NVIDIA/DALI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NVIDIA/DALI/downloads","issues_url":"https://api.github.com/repos/NVIDIA/DALI/issues{/number}","pulls_url":"https://api.github.com/repos/NVIDIA/DALI/pulls{/number}","milestones_url":"https://api.github.com/repos/NVIDIA/DALI/milestones{/number}","notifications_url":"https://api.github.com/repos/NVIDIA/DALI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NVIDIA/DALI/labels{/name}","releases_url":"https://api.github.com/repos/NVIDIA/DALI/releases{/id}","deployments_url":"https://api.github.com/repos/NVIDIA/DALI/deployments","created_at":"2018-06-01T22:18:01Z","updated_at":"2019-08-20T10:42:37Z","pushed_at":"2019-08-20T11:07:33Z","git_url":"git://github.com/NVIDIA/DALI.git","ssh_url":"git@github.com:NVIDIA/DALI.git","clone_url":"https://github.com/NVIDIA/DALI.git","svn_url":"https://github.com/NVIDIA/DALI","homepage":"https://docs.nvidia.com/deeplearning/sdk/dali-developer-guide/index.html","size":81417,"stargazers_count":1729,"watchers_count":1729,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":199,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":86,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":199,"open_issues":86,"watchers":1729,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NVIDIA/DALI/pulls/1174"},"html":{"href":"https://github.com/NVIDIA/DALI/pull/1174"},"issue":{"href":"https://api.github.com/repos/NVIDIA/DALI/issues/1174"},"comments":{"href":"https://api.github.com/repos/NVIDIA/DALI/issues/1174/comments"},"review_comments":{"href":"https://api.github.com/repos/NVIDIA/DALI/pulls/1174/comments"},"review_comment":{"href":"https://api.github.com/repos/NVIDIA/DALI/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NVIDIA/DALI/pulls/1174/commits"},"statuses":{"href":"https://api.github.com/repos/NVIDIA/DALI/statuses/0d419a80643cc1e0d9431eea339fde65dbb5d16d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"JanuszL"}}