diff options
Diffstat (limited to 'bpkg/types-parsers.txx')
-rw-r--r-- | bpkg/types-parsers.txx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bpkg/types-parsers.txx b/bpkg/types-parsers.txx index df6796f..f187fc7 100644 --- a/bpkg/types-parsers.txx +++ b/bpkg/types-parsers.txx @@ -65,5 +65,20 @@ namespace bpkg } } } + + template <const char* const* Q, typename V> + void parser<qualified_option<Q, V>>:: + merge (qualified_option<Q, V>& b, const qualified_option<Q, V>& a) + { + for (const auto& o: a) + { + auto i (b.find (o.first)); + + if (i != b.end ()) + i->second = o.second; + else + b.emplace (o.first, o.second); + } + } } } |