Bankim Bhavsar has posted comments on this change. ( http://gerrit.cloudera.org:8080/17035 )
Change subject: [gutil] update map-util to benefit from C++17 ...................................................................... Patch Set 2: (1 comment) http://gerrit.cloudera.org:8080/#/c/17035/2/src/kudu/gutil/map-util.h File src/kudu/gutil/map-util.h: http://gerrit.cloudera.org:8080/#/c/17035/2/src/kudu/gutil/map-util.h@446 PS2, Line 446: typename std::enable_if< : std::is_same<typename Collection::key_type, : typename Collection::value_type>::value, : bool>::type > Probably, there is more straightforward way of differentiating there. The > ideal case might be just probing for the existence of try_emplace() method. Yeah that would be good. Since the implementation doesn't actually add much of helper code, one option is to eliminate wrapper functions EmplaceIfNotPresent/EmplaceOrUpdate and let the callers directly invoke the collection specific emplace/try_emplace function. -- To view, visit http://gerrit.cloudera.org:8080/17035 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I248c03e604855434ea3a0891c311461a455b428e Gerrit-Change-Number: 17035 Gerrit-PatchSet: 2 Gerrit-Owner: Alexey Serbin <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Bankim Bhavsar <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Mahesh Reddy <[email protected]> Gerrit-Comment-Date: Mon, 08 Feb 2021 17:54:25 +0000 Gerrit-HasComments: Yes
