From c167259e6066db4f33ff901f93ba15fa59e5a9f0 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 26 Apr 2021 14:26:41 -0700 Subject: [PATCH] add empty method Simple and allows to avoid using std::distance. Signed-off-by: Rosen Penev --- src/pugixml.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pugixml.hpp b/src/pugixml.hpp index 023df44..ed234fb 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -312,6 +312,8 @@ namespace pugi It begin() const { return _begin; } It end() const { return _end; } + bool empty() const { return _begin == _end; } + private: It _begin, _end; };