Commit Graph

448 Commits

Author SHA1 Message Date
Vladimir Prus
d9ef3853c6 Merge branch 'develop' boost-1.66.0 boost-1.65.1 boost-1.65.0 2017-07-24 21:48:56 +03:00
Vladimir Prus
d164a20bc9 Additional test for error reporting.
Closes #30.
2017-07-24 21:48:04 +03:00
Vladimir Prus
3e1d2603e6 Fix out-of-range error
Closes #31.
2017-07-21 18:30:47 +03:00
Vladimir Prus
acaa4c94e1 Merge branch 'develop' 2017-06-25 21:41:31 +03:00
Vladimir Prus
a30cc1082f Feature macro for use-next-token-for-implicit-option behaviour. 2017-06-25 21:39:43 +03:00
Vladimir Prus
0565d1ee16 Merge from develop for 1.65.0
- 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.
2017-06-24 20:06:06 +03:00
Vladimir Prus
b35e654335 Update comments. 2017-06-10 22:44:09 +03:00
Vladimir Prus
ed72cc2f92 Add tests for the current implicit_value behaviour. 2017-06-10 22:44:09 +03:00
Vladimir Prus
c83abc21a0 Correct documentation for 'implicit_value'
Now we no longer say it requires value to be in the same
token.
2017-06-10 22:44:09 +03:00
Vladimir Prus
7729850bb7 Make options with implicit value use next token.
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.
2017-06-10 22:44:09 +03:00
jzmaddock
5dc325580b Namespace fix for diab (EDG) compiler
Extracted from Boost.Config issue: https://svn.boost.org/trac/boost/ticket/11655.
2017-04-17 00:00:32 +03:00
Edward Catmur
3277249932 Support boost::optional option variables. 2016-12-21 13:18:47 +03:00
Isaac Dupree
1c2472b8d7 fix syntax with BOOST_NO_EXCEPTIONS 2016-12-21 11:05:00 +03:00
Vladimir Prus
1f9413f532 Switch to using boost-lib. 2016-10-28 13:57:12 +03:00
Rene Rivera
abbb5c12a6 Add, and update, documentation build targets. boost-1.63.0 boost-1.64.0-beta2 boost-1.64.0-beta1 boost-1.64.0 2016-10-10 11:39:52 -05:00
Rene Rivera
dfdbcfca0f Add, and update, documentation build targets. 2016-10-07 23:07:35 -05:00
Gaurav
5a85b81fcf get_option_name() can throw std::logic_error
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    }
2015-10-06 09:43:09 +03:00
Vladimir Prus
8ca8b3957a Fix code duplication. 2015-09-12 21:51:31 +03:00
Vladimir Prus
a495b0210a Initialize position_key in second basic_option constructor. 2015-09-11 22:15:32 +03:00
Vladimir Prus
fae2d4c57b Merge from develop for 1.59
- 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)
boost-1.60.0 boost-1.59.0 boost-1.61.0 boost-1.62.0
2015-06-09 09:54:19 +03:00
Vladimir Prus
c0cee7f6da Go back to std::type_info in one more place. 2015-05-03 21:55:08 +03:00
Vladimir Prus
0756d35f8b Remove more unnecessary use of boost::type_index. 2015-05-01 19:15:36 +03:00
Vladimir Prus
bd1d0bd861 Put back std::type_info.
Since typed_value_base is only used with RTTI on, there's
no need to avoid std::type_info there.
2015-04-30 22:15:31 +03:00
Minmin Gong
6feeeb3b92 Using type_index to avoid RTTIs in program_options. (fixes #10347) 2015-04-30 22:10:44 +03:00
Marcel Raad
0efb385e99 Protect against max macro
This fixes compilation for MSVC in the case when NOMINMAX is not defined and the program_options include appears after the windows.h include.
2015-04-13 12:27:53 +03:00
Zoey Greer
2c4d25a04b Value-initialize m_desc
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.
2015-04-13 12:26:37 +03:00
Zoey Greer
bae408095f Explicitly initialize m_implicit
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.
2015-04-13 12:24:31 +03:00
Lauri Nurmi
c724b800a8 Fix spelling of "occurrence" where appropriate. 2015-03-29 19:13:14 +03:00
Vladimir Prus
0f9793e369 Make option_groups.cpp compile. 2015-02-15 21:41:48 +03:00
Michael John Decker
0c01e9aadc Add testing for implicit_values and non-consuming of separate tokens. 2014-12-31 02:04:17 +03:00
Michael John Decker
88dea3c6fd Stop options with implicit value from consuming separate tokens.
The current documentation states that if an option has implicit
value, it will only consume adjacent token.
2014-12-30 10:15:10 +03:00
Vladimir Prus
145e5728d7 Unbreak cmdline_test.
There was a k-vs-j loop error introduced by a prior comment.
2014-12-30 10:15:10 +03:00
Vladimir Prus
1d3294a058 Merge pull request #7 from jurko-gospodnetic/develop
Slight documentation cleanup.
2014-12-02 09:13:20 +03:00
Jurko
7542447620 fix documentation typos
environmemt --> environment
does not handles --> does not handle
2014-12-02 01:41:01 +01:00
Jurko
794de34bf9 trim trailing spaces 2014-12-02 01:40:17 +01:00
Vladimir Prus
095cb36f8a Merge pull request #6 from jurko-gospodnetic/develop
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.
2014-11-29 10:26:24 +03:00
Jurko
a9ea9bb453 escape first dash ('-') in double-dashes ('--') found in doxygen comments
This should prevent doxygen from generating bad documentation HTML pages
containing '<ndash></ndash>' where those double-dashes should be.
2014-11-27 10:21:48 +01:00
Jurko
3cec23f2ba fix documentation typos & style
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
2014-11-27 10:21:48 +01:00
Jurko
fcc4e6ef1a trim trailing spaces 2014-11-27 09:45:10 +01:00
Marcel Raad
1a17f20532 Compile fix for MSVC 14
Also fixes some new variable shadowing warnings
in cmdline_test with Visual C++ 14.
2014-11-24 17:16:21 +03:00
Hans Hohenfeld
6e846597d5 Use maximum unsigned as default multitoken limit.
Fixes #10718.
2014-11-24 17:09:58 +03:00
Daniel James
f081a93643 Add metadata file. 2014-11-24 17:07:37 +03:00
Vladimir Prus
37804b54d4 Remove unnecessary workaround.
Closes #9854.
2014-04-09 14:04:48 +04:00
Vladimir Prus
f50b02750a Don't increment environment pointer past the end.
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.
2014-01-20 09:28:12 +04:00
Daniela Engert
3ce1c74a0f Suppress msvc level-4 warnings.
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>
2014-01-09 08:47:21 +04:00
Daniela Engert
2acfab15a3 Fix config_file compilation errors with MSVC
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>
2014-01-09 01:19:15 +04:00
Vladimir Prus
4ae33ce15e Add dllexport to common_config_file_iterator.
As reported in #6797, there are linker errors otherwise. I
do not know why regression tests, which test dll linking
explicitly, do not catch this.
2013-12-19 08:16:19 +04:00
Vladimir Prus
fda6414443 Don't use vector<>::data.
This is only required by C++ 11. Most compilers have it anyway,
but there are exceptions, like msvc 8 and msvc 9.
2013-12-19 08:09:13 +04:00
Vladimir Prus
9d7c987526 Remove tabs. boost-1.58.0 boost-1.57.0 boost-1.56.0 2013-12-04 09:17:17 +04:00
Vladimir Prus
0a7005d7c6 Merge branch 'develop' 2013-12-04 09:13:36 +04:00