mirror of
https://github.com/monero-project/monero.git
synced 2025-08-18 18:17:59 -04:00
Merge pull request #2589
8f0cea63
add a command_line function to check for defaulted options (moneromooo-monero)
This commit is contained in:
commit
1280ba4f5b
5 changed files with 17 additions and 11 deletions
|
@ -189,6 +189,12 @@ namespace command_line
|
|||
return !value.empty();
|
||||
}
|
||||
|
||||
template<typename T, bool required>
|
||||
bool is_arg_defaulted(const boost::program_options::variables_map& vm, const arg_descriptor<T, required>& arg)
|
||||
{
|
||||
return vm[arg.name].defaulted();
|
||||
}
|
||||
|
||||
|
||||
template<typename T, bool required>
|
||||
T get_arg(const boost::program_options::variables_map& vm, const arg_descriptor<T, required>& arg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue