536 Commits

Author SHA1 Message Date
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
Michel Morin
fb4f36f3ee Merge r86524 (Correct broken links to C++ standard papers); fixes #9212
[SVN r86673]
2013-11-13 03:22:55 +00:00
Vladimir Prus
6bf4607eac Align columns across groups in --help output.
Patch from Leo Goodstadt.
Fixes #6114.


[SVN r86571]
2013-11-06 09:23:14 +00:00
Michel Morin
81844db902 Correct broken links to C++ standard papers. Refs #9212.
[SVN r86524]
2013-10-30 12:51:24 +00:00
Stephen Kelly
d3f32ca813 ProgramOptions: Remove obsolete GCC version check.
[SVN r86115]
2013-10-01 08:47:31 +00:00
Stephen Kelly
da03a78b66 Remove obsolete MSVC check from pragma guard
git grep -h -B1 "^#\s*pragma once" | grep -v pragma | sort | uniq

is now clean.

[SVN r85952]
2013-09-26 13:02:51 +00:00
Vladimir Prus
5059a8f393 Silence gcc warning. Thanks to Chris Stylianou.
Closes #8725.


[SVN r84903]
2013-06-24 19:37:37 +00:00
Vladimir Prus
b430a83dfb Fix report of error for options with dashes.
Fixes #8009.
Patch from Markus Roth.


[SVN r82805]
2013-02-10 12:07:05 +00:00
Vladimir Prus
96b365ce17 Revive exception_txt_test.
Found while working on #8009.


[SVN r82804]
2013-02-10 11:59:51 +00:00
Vladimir Prus
2ceb54f9a2 Merge: Really fixes #7049.
[SVN r82556]
2013-01-20 07:13:55 +00:00
Vladimir Prus
e8e538036d Merge program_options revisions 79280 and 79283.
[SVN r79758]
2012-07-26 16:22:04 +00:00
Vladimir Prus
f11104084b Really fixes #7049.
[SVN r79477]
2012-07-13 19:06:30 +00:00
Vladimir Prus
a9993a8f01 Fix indent
[SVN r79289]
2012-07-05 17:00:50 +00:00