Andrew Wong 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; > K. Ah, yeah seems indeed we can't presume: "The element may be constructed even if there already is an element with the key in the container, in which case the newly constructed element will be destroyed immediately." >From https://en.cppreference.com/w/cpp/container/map/emplace -- 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 <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Grant Henke <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Comment-Date: Tue, 28 Aug 2018 06:29:36 +0000 Gerrit-HasComments: Yes
