Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/rfl/Object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ class Object {
/// The number of elements currently inside the object.
auto size() const { return data_.size(); }

std::size_t count(const key_type& key) const { return std::count_if(cbegin(), cend(), [&](const auto& p) { return p.first == key; }); }

/// The maximum possible size.
auto max_size() const { return data_.max_size(); }

Expand Down
Loading