martinzink commented on code in PR #1612:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1612#discussion_r1274805985
##########
libminifi/include/utils/FlatMap.h:
##########
@@ -282,20 +290,18 @@ class FlatMap{
return data_.max_size();
}
- bool empty() const noexcept {
+ [[nodiscard]] bool empty() const noexcept {
return data_.empty();
}
- bool contains(const K& key) const {
+ template<typename T>
+ requires std::equality_comparable_with<K, T>
+ bool contains(const T& key) const {
Review Comment:
Good idea, the first fallback works on MSVC aswell.
https://github.com/apache/nifi-minifi-cpp/pull/1612/commits/617fc38829b51a666b87ab11bd68ff9daea16523
Adding noexcept where applicable is a good idea, I didnt find any obvious
target on a quick glance, and I didnt want to burden this PR with a more
complex analysis. Should I file a new jira for this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]