Open acourdavault opened 5 years ago
Hello,
Issue: Cannot parse default of my options, i get null, null I am using Visual Community v14, Usage is:
R"(test_ua_client Usage: test_ua_client [--host=<host>] [--port=<port>] Options: --host=<host> Host [default: localhost]. --port=<port> Port [default: 53530]. )"
I tried to debug and in this piece of code (below) i ve noticed that:
from my understanding, this is where localhost should have been parsed
If I replace "\t" by spaces there is no issue. I thought this should have worked?
inline Option Option::parse(std::string const& option_description) { std::string shortOption, longOption; int argcount = 0; value val { false }; auto double_space = option_description.find(" "); auto options_end = option_description.end(); if (double_space != std::string::npos) { options_end = option_description.begin() + static_cast<std::ptrdiff_t>(double_space); } // ..... if (argcount) { std::smatch match; if (std::regex_search(options_end, option_description.end(), match, std::regex{"\\[default: (.*)\\]", std::regex::icase})) { val = match[1].str(); } }
Hello,
Issue: Cannot parse default of my options, i get null, null I am using Visual Community v14, Usage is:
I tried to debug and in this piece of code (below) i ve noticed that:
from my understanding, this is where localhost should have been parsed
If I replace "\t" by spaces there is no issue. I thought this should have worked?