An unintrusive implementation - no existing interfaces changed, and a single addition for obtaining all of the different long names.
Notes:
* Tests added for the new functionality, and existing tests expanded to take it into account.
* It is now impossible to specify long names with commas in them (but then, that wasn't properly supported before either, more of an oversight).
* The multiple long options are not included in the usage information - just the first one of them is printed
- Make options with implicit value use next token, like it did
before.
- Support boost::optional option variables.
- Fix syntax error with BOOST_NO_EXCEPTIONS
- Fix uninitlized position_key in some cases.
This commit reverts:
- 88dea3c6fd.
"Stop options with implicit value from consuming separate tokens."
- 0c01e9aadc.
"Add testing for implicit_values and non-consuming of separate tokens."
These commits from 2014 made options with implicit_value set only
consult value in the same token. The problem is that now implicit_value,
a sematic properly, forces a particular syntax, which proved to be
confusing.
get_option_name() calls get_canonical_option_prefix() which throws in file value_semantic.cpp line no 296
296 throw std::logic_error("error_with_option_name::m_option_style can only be "
297 "one of [0, allow_dash_for_short, allow_slash_for_short, "
298 "allow_long_disguise or allow_long]");
299 }
- Fix compilation errors, missing dllexport and warnings on
Windows and/or MSVC (Daniela Engert, Marcel Raad)
- Fix unintialized fields (Zoey Greer)
- Stop options with implicit value from consuming separate tokens (Michael John Decker)
- Make multitoken limit be max int, not 32K (Hans Hohenfeld)
- Code formatting and documentation fixes (Jurko, Lauri Nurmi)
- Minimal support for no-rtti build (Minmin Gong)
- Don't increment environment pointer past the end (Vladimir Prus)
Value-initialize m_desc (to NULL) in this constructor to avoid uninitialized memory situations. This issue is related to Coverity CID12523 and was uncovered by Coverity.
m_implicit was previously uninitialized in this constructor, leading to possibly inconsistent functionality. Instead, we now initialize it to false. This issue is related to Coverity CID10559 and was uncovered by Coverity.
typo corrections:
- otherwisee --> otherwise
- it's is --> it is
- nuber --> number
- will likely to use --> is likely to use
- varaible --> variable
- defauled --> defaulted
stylistic changes:
- which would make --> making
This should not effect correct programs, since once the
iterator itself is past-the-end, it should not matter what
the underlying state of that iterator is. But, the new behaviour
is more obvious.
Even when compiled at warning level 4 (i.e. all), project
policies may require compilations without warnings issued.
Signed-off-by: Daniela Engert <dani@ngrt.de>
Previous fix 4ae33c for ticket #6797 introduced a new problem with
Visual Studio compilers about two missing methods in
'common_config_file_iterator'. Adding those seemingly not required
methods as empty methods fixes the issue. As an added bonus, the
bogus warnings about DLL-interfaces get a silencing treatment, too.
Tests were run with vc10, vc11, and vc12. Without this fix, the
affected test cases fail on all 3 compilers. With the fix in place,
all tests pass.
Signed-off-by: Daniela Engert <dani@ngrt.de>
The name of option is now shown in most cases when it's feasible, and
clarify of the error messages has been improved throughout.
Patch from Leo Goodstadt.
[SVN r77827]