add empty method

Simple and allows to avoid using std::distance.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2021-04-26 14:26:41 -07:00
parent 5d58e94b6d
commit c167259e60

View File

@ -312,6 +312,8 @@ namespace pugi
It begin() const { return _begin; } It begin() const { return _begin; }
It end() const { return _end; } It end() const { return _end; }
bool empty() const { return _begin == _end; }
private: private:
It _begin, _end; It _begin, _end;
}; };