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

allow virtual configs to be templated to set optional value #37

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

nathanhhughes
Copy link
Collaborator

@Schmluk ran into an issue where checkValid would fail on a collection of configs like std::vector<VirtualConfig<Foo>> when parsing YAML where elements may not have their type specified. Calling setOptional after field fixes this, but results in a bunch of logged errors (that are very unintuitive). This seems to be a minimal fix (that behaves as before by default and allows setting the optional flag for virtual configs during construction).

Copy link
Collaborator

@Schmluk Schmluk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nathanhhughes nathanhhughes merged commit e435b99 into main Nov 25, 2024
2 checks passed
@nathanhhughes nathanhhughes deleted the feature/template_optional_virtual_configs branch November 25, 2024 21:25
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.

2 participants