1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-04-29 12:13:52 +00:00

15 Commits

Author SHA1 Message Date
Christoph Bachhuber
ffe5b29e1f Add cstdint and std::prefix to its symbols (#409)
* Add cstdint and std::prefix to its symbols

* Use int64_t in std::
2020-01-21 18:24:40 -06:00
Henry Schreiner
4b3a6b6214
Add std checking and try to fix filesystem being used on macOS 10.14 (#397)
* Add std checking and try to fix filesystem being used on macOS 10.14

* Adding extra check recommeded by @phlptp

* suppress  the double to int warning in msvc 2019 in the optional test

Co-authored-by: Philip Top <top1@llnl.gov>
2020-01-09 13:48:19 -05:00
Philip Top
418b7175f5 Type size refactor (#325)
* add expanded type_size specification

* add some more checks for type_size_max

* continued work on getting type sizes more flexible

* make some more tweaks to option to split up validate and reduce sections

* git rid of exceptions on the type_size functions exceptions,  allow any number to be entered for the min and max and don't make a distinction between flags and other types.

* add expected count

* add the allow extra args flag in an option

* start working in allow_extra_args

* write some stuff in the book,  and continue working on the failing test cases

* fix a few more of the helpers tests

* a few more test cases running

* all tests pass, fixing calls in ini files

* get vector<pair> working and all tests passing

* change callback to use reference to remove allocation and copy operation

* add support and test for vector<vector<X>>

* change Validators_ to validators_ for consistency

* fix linux warnings and errors by reording some templates and adding some typename keywords

* add support for std::vector<X> as the cross conversion type so optional<std::vector<X>> is supported using the full template of add_option.

* a few more test cases to take care of some coverage gaps

* add missing parenthesis

* add some more tests for coverage gaps

* add test for flag like option

* add transform test for `as<X>` function and make it pass through the defaults

* add a few more tests and have vector default string interpreted correctly.

* add test for defaulted integer,  and route default string for defaulted value which would otherwise be empty

* some code cleanup and comments and few more test coverage gap tests

* add more tests and fix a few bugs on the type size and different code paths

* remove path in results by fixing the clear of options so they go back to parsing state.

* get coverage back to 100%

* clang_tidy, and codacy fixes

* reorder the lexical_conversion definitions

* update some formatting

* update whitespace on book chapter
2019-11-10 05:36:16 +10:30
Henry Fredrick Schreiner
fda6126d7c Adding pre-commit 2019-10-24 19:07:01 -04:00
Philip Top
eab92ed988 modified option template (#285)
* add some tests with default capture on the two parameter template and some notes about it in the README.md

remove the test from visual studio 2015
vs2015 doesn't seem to properly deal with is_assignable in the cases we care about so make a standalone version that is more direct in what we are doing

add version to appveyor and add some notes to the readme

fix a few test cases to make sure code is covered and test a few other paths

remove unneeded enum streaming operator

add some diagnostic escapes around trait code to eliminate gcc Wnarrowing warnings

work specification of the template operations

remove optional add some templates for options conversions

add the two parameter template for add_option

* Fix some comments from Code review and add more description

* fix case when string_view doesn't work to append to a string.

* This PR also addressed #300

* modify lexical_cast to take  const std::string &, instead of by value to allow string_view in a few cases
2019-07-29 00:19:35 -04:00
Philip Top
76d2cde656 Positional argument checks (#262)
* some tweaks with optional

* remove set_results function that was bypassing some of the result processing in some cases of config files.

* add positional Validator example and tests add CLI::Number validator.

* add positional Validator example and tests add CLI::Number validator.

* do some reformatting for style checks and remove auto in test lambda.
2019-04-11 12:04:30 +02:00
Henry Fredrick Schreiner
8635c4d0eb Dropping reset in favor of clear 2018-06-27 12:26:03 +02:00
Henry Fredrick Schreiner
87494a2270 Allow Optional search to be disabled by user 2018-06-01 22:41:25 +02:00
Henry Fredrick Schreiner
ef1aa10fdb Test all optionals 2018-04-18 23:42:17 +02:00
Henry Fredrick Schreiner
67c4eb71e5 Style and typo fix 2018-04-04 18:29:32 +02:00
Henry Fredrick Schreiner
39e777392d Adding informational printout to ctest 2018-04-04 18:29:32 +02:00
Henry Fredrick Schreiner
43ec307781 Better message about optional test, warning suppression 2018-04-04 18:29:32 +02:00
Henry Fredrick Schreiner
7a7064df4e Adding optional, refactor single file 2018-04-04 18:29:32 +02:00
Henry Fredrick Schreiner
368f2cd9a6 Fix for deprecated macro 2018-04-04 18:29:32 +02:00
Henry Fredrick Schreiner
5c0d6617d5 Adding optional test 2018-04-04 18:29:32 +02:00