Skip to content
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

Construct Option with initializer_list #1772

Merged
merged 5 commits into from
May 26, 2020
Merged

Conversation

bendudson
Copy link
Contributor

@bendudson bendudson commented Jul 20, 2019

This enables initializer lists to be used to create custom options, to pass to solvers or other components. This is a slightly more compact way to create options trees than the existing method.

Unfortunately requires non-template constructors for the accepted types, but these are quite simple.

Includes tests and documentation.

bendudson and others added 2 commits July 20, 2019 18:12
This enables initializer lists to be used to create custom options,
to pass to solvers or other components. This is a slightly more
compact way to create options trees than the existing method.

Unfortunately requires non-template constructors for the accepted
types, but these are quite simple.

Includes tests and documentation.
johnomotani
johnomotani previously approved these changes Jul 23, 2019
include/options.hxx Outdated Show resolved Hide resolved
include/options.hxx Outdated Show resolved Hide resolved
@ZedThree
Copy link
Member

Codacy would like both these constructors to be explicit, which is probably fair, at least for Options(T).

@ZedThree
Copy link
Member

Thanks @bendudson ! Very sorry this took such a long time to deal with! 😬

@ZedThree ZedThree merged commit 7adea54 into next May 26, 2020
@ZedThree ZedThree deleted the options-initializer-list branch May 26, 2020 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants