Config: fold over one-liner packs
This commit is contained in:
parent
4d086b6db4
commit
1803cb6d54
1 changed files with 4 additions and 10 deletions
|
@ -537,12 +537,9 @@ public:
|
|||
|
||||
void remove_attribute(config_key_type key);
|
||||
void merge_attributes(const config &);
|
||||
|
||||
template<typename... T>
|
||||
void remove_attributes(T... keys) {
|
||||
for(const auto& key : {keys...}) {
|
||||
remove_attribute(key);
|
||||
}
|
||||
}
|
||||
void remove_attributes(T... keys) { (remove_attribute(keys), ...); }
|
||||
|
||||
/**
|
||||
* Copies attributes that exist in the source config.
|
||||
|
@ -604,13 +601,10 @@ public:
|
|||
|
||||
private:
|
||||
void clear_children_impl(config_key_type key);
|
||||
|
||||
public:
|
||||
template<typename... T>
|
||||
void clear_children(T... keys) {
|
||||
for(auto key : {keys...}) {
|
||||
clear_children_impl(key);
|
||||
}
|
||||
}
|
||||
void clear_children(T... keys) { (clear_children_impl(keys), ...); }
|
||||
|
||||
/**
|
||||
* Moves all the children with tag @a key from @a src to this.
|
||||
|
|
Loading…
Add table
Reference in a new issue