374 Commits

Author SHA1 Message Date
Daniel Aarno
d3ae484f7f IWYU: sstream
Explicitly include sstream in tets wherever it is used.
2017-12-23 16:50:07 +01:00
Daniel Aarno
3d02fed104 Fixed more typos 2017-09-02 17:37:56 +01:00
Daniel Aarno
3ccab57178 Fixed typo 2017-09-02 17:16:53 +01:00
Daniel Aarno
7ab738957c Quick fix for ZshCompletionOutput test
The test was failing because elipsis changed from "..." to
"... ". This is a quick and dirty fix and should be cleaned up.

Also updated copyright notice
2017-08-30 14:26:02 +01:00
Daniel Aarno
1a40e8f5a8 Add const to iterators and xorAdd
No need to modify the passed vector, it should be a const reference.

https://sourceforge.net/p/tclap/patches/14/
2017-08-24 21:50:17 +01:00
Daniel Aarno
0333b277a5 Fix } outside of include guards
You get an extra brace if ArgTraits.h ends up included more than once

https://sourceforge.net/p/tclap/patches/13/
2017-08-24 21:44:33 +01:00
Daniel Aarno
4970b7e793 Check for NULL constraint and raise exception if found.
User is not allowed to provide a NULL constraint to the various ARG
constructors. This patch makes sure the Constraint is not NULL before
dereferencing and raises a logic_error if it is NULL.

Also included the two new tests test88 and test89 in runtests script.
2015-05-11 22:47:42 +02:00
Daniel Aarno
e2ed6cfbc4 Correctly run test88 (fixed arguments) 2015-05-11 22:45:09 +02:00
Daniel Aarno
e006d96c53 Mark getValue functions as const.
The various getValue functions should not modify the underlying class,
so they have been turned into const. The only exception is ValueArg
where a non-const version is kept for backward compatibility (it
should be removed if we allow an API break). The other instances are
safe since the return value is not changed and the new function
signature is less restrictive.
2015-05-11 22:19:34 +02:00
Daniel Aarno
b3f85f4965 Cleanup: Unify indentation and line length across files.
Consistenly use 4 space indent (no tabs) and < 80 char lines. The
files were very inconsistent and hard to edit.
2015-05-11 22:08:25 +02:00
Daniel Aarno
b162f59fcb Feature Request #8 Implicit Conversion Operators for SwitchArg and ValueArg. 2015-05-11 21:41:56 +02:00
Daniel Aarno
12cee38782 Added new test after merging traits branch. 2013-10-26 14:00:45 +02:00
Daniel Aarno
bd0440fdbd Merge branch 'traits'
Make all types have ValueLike traits by default.

This allows new types to be added without any fuzz (no need to specify
the traits) if it has operator>>. It also removes the need to manually
specify the ArgTrait for all built in types (such as long, bool, char,
float etc).

ArgTraits now works in the following way:

1) If there exists a specialization of ArgTraits for type X, use it.

2) If no specialization exists but X has the typename
X::ValueCategory, use the specialization for X::ValueCategory.

3) If neither (1) nor (2) defines the trait, use the default which is
ValueLike.

Conflicts:
	examples/Makefile.am
	examples/test24.cpp
	tests/Makefile.am
	tests/runtests.sh
	tests/test83.out
	tests/test83.sh
2013-10-26 13:56:31 +02:00
Daniel Aarno
befc5f9bcf Mark new tests as executable 2013-10-26 13:42:48 +02:00
Daniel Aarno
3816281229 Actually test StringLikeTrait 2013-10-26 13:38:56 +02:00
Daniel Aarno
279a82494f Added test for Zshcompletionoutput - fails 2013-10-26 13:38:56 +02:00
Daniel Aarno
6e236d28db Initialize theDelimiter (supress warning), found by test23. 2013-10-26 13:38:56 +02:00
Daniel Aarno
b60f3c14d1 Added tests for various Arg properties such as invalid flag/names and
DocBookOutput
2013-10-26 12:58:23 +02:00
Daniel Aarno
a5e1c09cef Always run test script in test-dir 2013-10-26 12:56:30 +02:00
Daniel Aarno
b96e42cf76 Make "visit" method pure virtual (needs to be implemented by subclass
to make sense).
2013-10-26 12:56:27 +02:00
Daniel Aarno
5d4ffbf2db Make all types have ValueLike traits by default.
This allows new types to be added without any fuzz (no need to specify
the traits) if it has operator>>. It also removes the need to manually
specify the ArgTrait for all built in types (such as long, bool, char,
float etc).

ArgTraits now works in the following way:

1) If there exists a specialization of ArgTraits for type X, use it.

2) If no specialization exists but X has the typename
X::ValueCategory, use the specialization for X::ValueCategory.

3) If neither (1) nor (2) defines the trait, use the default which is
ValueLike.
2013-05-18 15:02:30 +02:00
Daniel Aarno
f41dcb5ce3 Increase test number (actually run all tests). 2013-05-18 15:02:19 +02:00
Daniel Aarno
520be219de Simplify .gitignore by using globs and added some more ignores 2013-05-18 14:52:19 +02:00
Mike Smoot
df2e88ae56 updated ignores 2012-11-25 15:00:15 -08:00
Mike Smoot
a910939b9a Added more unit tests and clarified difference to UnlabeledMultiArg. 2012-11-25 14:46:34 -08:00
Mike Smoot
634cbb01f5 Updated manual for ignore unmatched args. 2012-11-25 14:04:36 -08:00
Mike Smoot
14ac7a1c17 Merged master into branch. 2012-11-25 13:40:11 -08:00
Mike Smoot
93fc061003 Added git ignores 2012-11-25 13:25:39 -08:00
Mike Smoot
2fee9bc48e reverted changes? 2011-05-22 12:41:48 -07:00
Mike Smoot
fdce4f38f0 Allows xor args to be optional 2011-05-22 12:05:21 -07:00
Mike Smoot
a5105dc72a added patch to fix brief output with TCLAP_NAMESTRING defined 2011-05-22 11:50:16 -07:00
Michael Smoot
f946bb210d added support for ignoring unmatched args 2011-04-17 15:04:28 -07:00
mes5k
3627d9402e updated changelog, news, docs, and added tests for flag and name defines tclap-1-2-1-release-final 2011-04-16 22:31:18 +00:00
mes5k
122b50e26d patch that allows arg start strings to be pound defined to easily conform to different platforms tclap-1-2-1-release 2011-04-11 00:08:41 +00:00
mes5k
d0cddc3183 being slightly more precise about what we clean 2011-04-09 18:58:33 +00:00
mes5k
89f4aacf98 fixed shadow variable name problem 2011-04-09 18:30:32 +00:00
mes5k
cbc24a3b58 fixed minor memory leak 2011-04-09 18:05:35 +00:00
macbishop
95dad7832b Check if compiler supports Weffec++ and if so use it (fixes
compilation issue with e.g. SunStudio compiler)
2011-03-15 11:26:48 +00:00
macbishop
e2eb7b522e Updated documentation for ArgTraits to reference StringLike and ValueLike classes. 2011-01-15 17:45:17 +00:00
macbishop
234fe9c7ff Added explicit cast to supress warning about deprecated conversion from string constant to char* 2011-01-15 17:32:08 +00:00
mes5k
ff7b9f89aa now using a slightly different variable for doc install to support out-of-tree builds 2011-01-03 01:18:49 +00:00
mes5k
febbb86d9d bumped version number to 1.2.1 tclap-1-2-1 2011-01-03 00:37:07 +00:00
mes5k
66846b5741 tweaked style so it doesn't blink 2011-01-03 00:30:39 +00:00
mes5k
94ed69a0d9 tweaked tests to reflect fix for mutually exclusive switches 2011-01-03 00:21:19 +00:00
mes5k
fc9d87a003 finally fixed bug relating to mutually exclusive combined switched 2011-01-03 00:20:46 +00:00
mes5k
4ba45abdb9 minor reformat 2011-01-02 23:12:56 +00:00
mes5k
82d187771b minor reformatting 2011-01-02 23:10:18 +00:00
mes5k
d6f5047688 added failing tests for XOR error message bug 2011-01-02 20:13:59 +00:00
mes5k
09c1d2a113 applied Tom Fogal's win64 patch for size_t 2011-01-02 19:52:54 +00:00
mes5k
fda780a4a5 hopefully fixed out-of-tree doc installation 2011-01-02 19:38:33 +00:00