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 }
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.
Documentation cleanups from Jurko Gospodnetić:
- trim trailing spaces
- fix documentation typos & style
- escape first dash ('-') in double-dashes ('--') in doxygen comments
This should prevent doxygen from generating bad documentation HTML pages
containing '<ndash></ndash>' where those double-dashes should be.
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>