Andrew Wong 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: Code-Review+2 (2 comments) 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 > > The value_type for map is always pair<const key_type, mapped_type>. So, nit: maybe add a note to the above comment so future readers don't find themselves asking this question? http://gerrit.cloudera.org:8080/#/c/17035/2/src/kudu/gutil/map-util.h@470 PS2, Line 470: insert_or_assign At first I found it a bit odd that we're calling insert in an emplace function, but seems they're sometimes equivalent. https://en.cppreference.com/w/cpp/container/map/insert > Inserts value. The overload (2) is equivalent to > emplace(std::forward<P>(value)) and only participates in overload resolution > if std::is_constructible<value_type, P&&>::value == true. -- 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 18:23:37 +0000 Gerrit-HasComments: Yes
