NOTE: this is based on https://github.com/jbeder/yaml-cpp/pull/1243, but includes a fix for proper merging (by comparing the key itself, instead of shared_ptrs, see the last patch).
Support for YAML Merge keys ( <<: [dict1, dict2] ) is added. The merge
key is a specific scalar with value << (and tag !!merge) that implies
that during node construction, the map (or sequence of maps) are merged
into the current map. The priority rules are that each key from maps
within the value associated with << are added iff the key is not yet
present in the current map (and first map gets higher priority). Test
cases have been added accordingly.
NOTE: this is based on https://github.com/jbeder/yaml-cpp/pull/1243, but includes a fix for proper merging (by comparing the key itself, instead of shared_ptrs, see the last patch).
Support for YAML Merge keys ( <<: [dict1, dict2] ) is added. The merge key is a specific scalar with value << (and tag !!merge) that implies that during node construction, the map (or sequence of maps) are merged into the current map. The priority rules are that each key from maps within the value associated with << are added iff the key is not yet present in the current map (and first map gets higher priority). Test cases have been added accordingly.