From ca53b225bfc6887dd27e278820c34992cce37c6d Mon Sep 17 00:00:00 2001 From: aligirayhanozbay <44897017+aligirayhanozbay@users.noreply.github.com> Date: Tue, 12 Aug 2025 14:44:28 +0100 Subject: [PATCH] Add interfaces for jwt-cpp compatibility (#479) Co-authored-by: Ali Girayhan Ozbay --- include/rfl/Object.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/rfl/Object.hpp b/include/rfl/Object.hpp index eb888374..9a02be19 100644 --- a/include/rfl/Object.hpp +++ b/include/rfl/Object.hpp @@ -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(); }