options: add variadic call of add()
This commit is contained in:
parent
39b0319cab
commit
ddf6711a44
1 changed files with 3 additions and 0 deletions
|
|
@ -115,6 +115,9 @@ namespace ztd
|
|||
/*CREATION FUNCTIONS*/
|
||||
//! @brief Add option to the set
|
||||
inline void add(option opt) { option_vec.push_back(opt); }
|
||||
//! @brief Variadic call of add()
|
||||
template<class... Args>
|
||||
void add(Args... args) { std::vector<option> rargs = { static_cast<option>(args)...}; for(auto it: rargs) add(it); }
|
||||
|
||||
/*PRINT FUNCTIONS*/
|
||||
//! @brief Print help for the full option set
|
||||
|
|
|
|||
Loading…
Reference in a new issue