示例#1
0
文件: option.cpp 项目: medsec/mack
std::string const&
mack::options::option::get_default_value() const
{
  if (!has_default_value())
  {
    BOOST_THROW_EXCEPTION(no_value_error()
        << errinfo_option_flag(get_long_flag()));
  }
  else
  {
    return _default_value;
  }
}
示例#2
0
文件: options.cpp 项目: jmmv/kyua
/// Returns the default value for the argument to the option.
///
/// \pre has_default_value() must be true.
///
/// \return The default value.
const std::string&
cmdline::base_option::default_value(void) const
{
    INV(has_default_value());
    return _default_value;;
}