-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Container options #423
Container options #423
Conversation
Todo:
|
Codecov Report
@@ Coverage Diff @@
## master #423 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 12 12
Lines 3583 3668 +85
=====================================
+ Hits 3583 3668 +85
Continue to review full report at Codecov.
|
a573308
to
bfc6a8a
Compare
bc4a5a1
to
91c63a0
Compare
@henryiii this is getting closer to being ready to go. I am still working on the readme and book probably for a couple days yet. Had a few questions though. With this PR complex numbers(without requiring the To handle some options nicely like
would create a vector with two element vectors one with 4 element and 1 with 2. But I am not sure if |
@phlptp Maybe rather something that does not require quoting in standard shells? |
That is a very good point that I had not been considering thus far. |
So looking at a list of bash special character That could mean something like |
I think I am leaning towards |
Bash, and Windows CMD seems to be OK with that. BTW: # does not have to be at the beginning of the line to start a comment in bash. |
7869971
to
1273c33
Compare
…nt usage and the modifications to the add_options templates. add support in add_option for wrapper types, such as std::optional, boost::optional or other types with a value_type trait. Add support for generalized containers beyond vector, add support for nested tuples and vectors, and complex numbers directly in add_option. This includes several new type traits and object categories. Upgrade the google test version to better support templated tests. add support for vector argument separator `%%`
1273c33
to
9c86a5c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any major issues; we can polish a little as we go if needed, but over all looks very good.
If merged this pull request will generalize the types that can be used in add_option to any container.
A container in this case is any type with a
value_type
member anditerator
member, anend()
method, aclear()
method, and aninsert
method. This supports all the standard containers, though not stack, or queue since they don't support an insert operation. Should support most other containers as well if they have a similar interface to the standard library ones.Also support any type with a
value_type
defined. And supports complex number type (any type with real(), and imag() methods directly in add_option.One other change is updated google test v1.10.0 to better support templated tests and match the current documentation for google test, so we don't have to figure out where old docs are for getting google test to work.