| 82 | |
| 83 | template <typename K, typename V> |
| 84 | inline const std::optional<V> findOptionally( |
| 85 | const std::map<K, V>& map, const K& key, const V& defaultValue = V()) |
| 86 | { |
| 87 | auto it = map.find(key); |
| 88 | if (it == map.end()) |
| 89 | return std::nullopt; |
| 90 | return std::make_optional(it->second); |
| 91 | } |
| 92 | |
| 93 | #endif |
no test coverage detected