mirror of
https://github.com/biojppm/rapidyaml.git
synced 2026-01-18 21:41:18 +01:00
1.8 KiB
1.8 KiB
Changes
- PR#565 (fixes #564) -
Treearena: allow relocation of zero-length strings when placed at the end (relax assertions triggered inTree::_relocated()) - PR#561 (fixes #559) - Byte Order Mark: account for BOM when determining block indentation
- PR#563 (fixes #562) - Fix bug in
NodeRef::cend() - PR#547 - Fix parsing of implicit first documents with empty sequences, caused by a problem in
Tree::set_root_as_stream():[] # this container was lost during parsing --- more data here - PR#557 -
Treeis now non-empty by default, andTree::root_id()will no longer modify the tree when it is empty. To create an empty tree now, it is necessary to use the capacity constructor with a capacity of zero:This changeset also enables the python library to call// breaking change: default-constructed tree is now non-empty Tree tree; assert(!tree.empty()); // MODIFIED! was empty on previous version id_type root = tree.root_id(); // OK. default-constructed tree is now non-empty // to create an empty tree (as happened before): Tree tree(0); // pass capacity of zero assert(tree.empty()); // as expected // but watchout, this is no longer possible: //id_type root = tree.root_id(); // ERROR: cannot get root of empty tree.root_id()on a default-constructed tree (fixes #556).