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

Support for ranges, containers and types with tuple interface. #727

Closed
Remotion opened this issue May 4, 2018 · 7 comments
Closed

Support for ranges, containers and types with tuple interface. #727

Remotion opened this issue May 4, 2018 · 7 comments

Comments

@Remotion
Copy link
Contributor

Remotion commented May 4, 2018

Here is C++17 code add support for ranges, containers and types with tuple interface.

May this could be added to fmt in one or another way.

@Morwenn
Copy link

Morwenn commented May 5, 2018

Just dropping a link to the Reddit discussion which has some interesting comments which might also be discussed here :)

@vitaut
Copy link
Contributor

vitaut commented May 5, 2018

@Remotion, this is super cool!

May this could be added to fmt in one or another way.

Definitely. I think this can be added in a separate header such as fmt/ranges.h or something (naming ideas are welcome). Could you submit a PR?

@Remotion
Copy link
Contributor Author

Remotion commented May 8, 2018

Yes I will prepare PR.

Do we also need structured binding support? But it will be a bit macro heavy for now.

@vitaut
Copy link
Contributor

vitaut commented May 9, 2018

Do we also need structured binding support?

I'm not sure. How would structured building support look like from the user perspective?

@Remotion
Copy link
Contributor Author

Remotion commented May 10, 2018

This way.
struct my_struct { std::string str_; }
int main() { my_struct st{}; fmt::print("{}\n", st); }

But I think it would be better first do ranges and may be then structured binding.

@vitaut
Copy link
Contributor

vitaut commented May 12, 2018

Yeah, let's focus on ranges first.

@vitaut
Copy link
Contributor

vitaut commented May 13, 2018

Closing since #735 has been merged. Thanks again!

@vitaut vitaut closed this as completed May 13, 2018
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

No branches or pull requests

3 participants