Rename variable, add to example

This commit is contained in:
Jarryd Beck 2021-02-15 08:33:56 +11:00
parent 43ce03fdbd
commit aaa5e790b6
2 changed files with 5 additions and 2 deletions

View File

@ -1636,7 +1636,7 @@ namespace cxxopts
const HelpOptionDetails& o,
size_t start,
size_t allowed,
bool m_tab_expansion
bool tab_expansion
)
{
auto desc = o.desc;
@ -1655,7 +1655,7 @@ namespace cxxopts
String result;
if (m_tab_expansion)
if (tab_expansion)
{
String desc2;
auto size = size_t{ 0 };

View File

@ -39,6 +39,8 @@ parse(int argc, const char* argv[])
bool apple = false;
options
.set_width(70)
.set_tab_expansion()
.allow_unrecognised_options()
.add_options()
("a,apple", "an apple", cxxopts::value<bool>(apple))
@ -56,6 +58,7 @@ parse(int argc, const char* argv[])
("long-description",
"thisisareallylongwordthattakesupthewholelineandcannotbebrokenataspace")
("help", "Print help")
("tab-expansion", "Tab\texpansion")
("int", "An integer", cxxopts::value<int>(), "N")
("float", "A floating point number", cxxopts::value<float>())
("vector", "A list of doubles", cxxopts::value<std::vector<double>>())