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

map and set initializer_list constructors #175

Open
jeaye opened this issue Apr 21, 2021 · 1 comment
Open

map and set initializer_list constructors #175

jeaye opened this issue Apr 21, 2021 · 1 comment

Comments

@jeaye
Copy link

jeaye commented Apr 21, 2021

Hello! Thank you so much for making immer. I see that arrays and vectors support initialize_list ctors. Is there any reason why maps and sets don't? I haven't found any docs or issues suggesting a reason, so it could be an oversight?

// This works.
immer::vector<int> v{ 1, 2, 3, 4 };

// These do not compile.
immer::set<int> s{ 1, 2, 3, 4 };
immer::map<int, int> m{ {1, 2}, {3, 4} };

// All of these work.
std::vector<int> v{ 1, 2, 3, 4 };
std::set<int> s{ 1, 2, 3, 4 };
std::map<int, int> m{ {1, 2}, {3, 4} };
@arximboldi
Copy link
Owner

It is simply a missing feature. I've been wanting to add it when I add map transients, which is top of the TODO-list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants