Is there an easy to delete a child (and its eventual subchildren) from a property tree that is known via its path?
The following
auto child = ptree.get_child(path);
child.clear();
does not actually remove the child, but only its content.
The erase
member function takes an iterator or a key. I don't know of an easy way to find the iterator corresponding to a path, without having to iterate through the tree.
One could find the "root" children by by splitting the path at dot characters, and erase
ing the remaining. However is there any easier/shorter way of getting there?