Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/11303 )
Change subject: error_manager: rename error types ...................................................................... Patch Set 4: (1 comment) http://gerrit.cloudera.org:8080/#/c/11303/4/src/kudu/gutil/map-util.h File src/kudu/gutil/map-util.h: http://gerrit.cloudera.org:8080/#/c/11303/4/src/kudu/gutil/map-util.h@457 PS4, Line 457: typedef typename Collection::mapped_type mapped_type; : auto it = collection->find(key); : if (it == collection->end()) { : collection->emplace(key, std::forward<mapped_type>(value)); : return true; : } : it->second = std::forward<mapped_type>(value); : return false; > What's tricky about passing the variadic rvalues is that we're passing in t K. FWIW, one of my in-flight patches introduces the following Emplace* method: template <class Collection, class... Args> typename Collection::mapped_type& LookupOrEmplace(Collection* const collection, Args&&... args) { return collection->emplace(std::forward<Args>(args)...).first->second; } -- To view, visit http://gerrit.cloudera.org:8080/11303 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I377904ee51bb0f7b0f1104d7a4723f74d52e6e3f Gerrit-Change-Number: 11303 Gerrit-PatchSet: 4 Gerrit-Owner: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Grant Henke <granthe...@apache.org> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Comment-Date: Mon, 27 Aug 2018 22:58:38 +0000 Gerrit-HasComments: Yes