mirror of
https://github.com/monero-project/monero.git
synced 2025-06-21 05:54:14 -04:00
add a command_line function to check for defaulted options
This commit is contained in:
parent
a2041c9874
commit
8f0cea6355
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