We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3dc74c9 commit ca53b22Copy full SHA for ca53b22
include/rfl/Object.hpp
@@ -90,6 +90,8 @@ class Object {
90
/// The number of elements currently inside the object.
91
auto size() const { return data_.size(); }
92
93
+ std::size_t count(const key_type& key) const { return std::count_if(cbegin(), cend(), [&](const auto& p) { return p.first == key; }); }
94
+
95
/// The maximum possible size.
96
auto max_size() const { return data_.max_size(); }
97
0 commit comments