NodeRef: fix bug in cend()

This commit is contained in:
Joao Paulo Magalhaes
2025-12-17 12:15:23 +00:00
parent ed7f655be3
commit a572d084a4
2 changed files with 2 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
### Changes
- [PR#563](https://github.com/biojppm/rapidyaml/pull/563) (fixes [#562](https://github.com/biojppm/rapidyaml/issues/562)) - Fix bug in `NodeRef::cend()`
- [PR#547](https://github.com/biojppm/rapidyaml/pull/547) - Fix parsing of implicit first documents with empty sequences, caused by a problem in `Tree::set_root_as_stream()`:
```yaml
[] # this container was lost during parsing

View File

@@ -757,7 +757,7 @@ public:
/** get an iterator to after the last child */
C4_ALWAYS_INLINE const_iterator end() const RYML_NOEXCEPT { _C4RR(); return const_iterator(tree_, NONE); }
/** get an iterator to after the last child */
C4_ALWAYS_INLINE const_iterator cend() const RYML_NOEXCEPT { _C4RR(); return const_iterator(tree_, tree_->first_child(id_)); }
C4_ALWAYS_INLINE const_iterator cend() const RYML_NOEXCEPT { _C4RR(); return const_iterator(tree_, NONE); }
/** get an iterable view over children */
template<class U=Impl>