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

Feature/maps #7

Merged
merged 8 commits into from
Feb 21, 2024
Merged

Feature/maps #7

merged 8 commits into from
Feb 21, 2024

Conversation

nathanhhughes
Copy link
Collaborator

@Schmluk about 90% there on the maps; just need to actually take care of printing keys instead of indices (and cleaning up some unintended changes). Will pick this up and finalize it tomorrow morning

@nathanhhughes nathanhhughes marked this pull request as ready for review February 21, 2024 14:37
@nathanhhughes
Copy link
Collaborator Author

@Schmluk should be ready. I opted to rework how the ADL dispatch works, which lets us now define specializations before declare_config is actually defined (which is useful for stl types). I think this is cleaner (it lets us directly use setValues and getValues on vectors and maps), but lmk if you feel different

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.

Looks great! I'm fine with moving the ADL to the other namespace, don't think it makes a difference for any of my purposes.

@@ -63,9 +63,12 @@ std::string AslFormatter::formatErrorsRecursive(const MetaData& data, const std:
const std::string name_prefix_before = name_prefix_;
if (Settings::instance().inline_subconfig_field_names) {
if (!data.field_name.empty()) {
// TOOD(nathan) refactor to put in metadata
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is purely a printing problem? Not sure if this needs to go into meta data.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah, I wasn't sure what the right split between formatting the indices/keys and just getting the string values of the indices/keys if they exist was so I punted on figuring it out for now

@@ -47,7 +47,9 @@

namespace config::test {

namespace {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just for my understanding, does this hide it from other tests or what is the idea here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorta, it prevents multiple definitions (I copied the array tests pretty much wholesale for maps and got a multiply-defined symbol error)

@nathanhhughes nathanhhughes merged commit 2735fd7 into main Feb 21, 2024
2 checks passed
@nathanhhughes nathanhhughes deleted the feature/maps branch February 21, 2024 16:03
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