Currently, the diagrams which allow hierarchical structure such as class diagram with packages, are currently based on overly complicated nested_trait type, which makes combining the diagrams very difficult and inflexible (impossible to have packages of different types - e.g. directory and namespace in 1 diagram).
The diagram model should just hold all leaf elements such as classes, concepts etc. in a indexed container when processing the translation units, and then during diagram generation the nested structure should be inferred from the elements namespaces, filesystem paths etc depending on the diagram configuration.