* new function: cxxopts::Option::set_width(size_t width)
Set the size of a helpline.
* new function: cxxopts::Option::set_tab_expansion()
Expand the tabs in descriptions.
The tabsize 8 chars, base is start of description.
The descriptions are not disturbed by adding additional options.
* Allow newlines \n nad tabs \t in descriptions.
Other changes (last commit/new commit):
* 1453/1471: size_t for OPTION_LONGEST and OPTION_DESC_GAP.
This prevents the static cast in 2086/2140.
* 2088/2142: in case of small width the value of
"width - longest - OPTION_DEC_GAP" becomes negative.
Because size_t is unsigned the result is a big number, and
the width of the column of the descriptions is not shortened.
* new 2143: When the given width is too small, it is set to
longest + OPTION_DESC_GAP + 10
* new 1570: A long description is broken into multiple lines, and
the iterator lastSpace remembers the begin of the last word.
But when the iterator current reaches the end of line, the whole
string from iterator is printed, which in soome cases is too
long. Thats why one blank is added to the description to trigger
the handling of lastSpace.
Accordingly in 1574/1627 the line is shortened by one char.
This speeds up the CMake configuration step by not searching for a C
compiler. By default, CMake looks for C and C++ compilers, unless a set
of compilation languages is specified.
Some positional parameters would be listed in the help text and others
would not, when what is desired is that no positional parameters are
listed with the other command options. This change suppresses the help
listing for all positional parameters.
String literals with the prefix `u8` now have the type `const char8_t[N]` in
C++20. As a consequence the library does not compile in c++2a mode with GCC
(you can't concatenate `std::basic_string<char>` and `const char8_t[]` as
`char` and `char8_t` are different types).
Fixes#132. Since the map of options is shared between Options and
ParseResult, they should use a shared pointer instead of a reference so
that ParseResult can be returned without referencing destroyed memory.
Fixes#109. Although we always used numbers in the ASCII range, it was
in a `size_t`, leading to a warning about possible loss of data on some
compilers.