8000
Skip to content

Fix usage with std::generator#4057

Merged
vitaut merged 1 commit intofmtlib:masterfrom
Arghnews:fix_std_generator
Jul 9, 2024
Merged

Fix usage with std::generator#4057
vitaut merged 1 commit intofmtlib:masterfrom
Arghnews:fix_std_generator

Conversation

@Arghnews
Copy link
Copy Markdown
Contributor
@Arghnews Arghnews commented Jul 7, 2024

Fixes #4053

Tested on (docker image) Ubuntu 24.04 with gcc 14

Copy link
Copy Markdown
Contributor
@vitaut vitaut left a comment

Choose a reason for hiding this comment

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

Thanks for the PR but could you add a test case that exercises this path to ranges-test?

@Arghnews
Copy link
Copy Markdown
Contributor Author
Arghnews commented Jul 8, 2024

Thanks for the PR but could you add a test case that exercises this path to ranges-test?

Sure thing, will do.

I'll put the test behind an ifdef for __cpp_lib_generator
Note though, that currently only gcc14 supports the <generator> header, see https://en.cppreference.com/w/cpp/compiler_support#cpp23
So if you would like the fmtlib CI test matrix to actually test this code, it would need an Ubuntu 24.04 instance with gcc 14 added to the github workflows

@vitaut
Copy link
Copy Markdown
Contributor
vitaut commented Jul 8, 2024

I think we don't need to use generator, just some range with move-only iterators.

@Arghnews Arghnews force-pushed the fix_std_generator branch from a12f910 to a0572b0 Compare July 8, 2024 23:24
@Arghnews
Copy link
Copy Markdown
Contributor Author
Arghnews commented Jul 8, 2024

I think we don't need to use generator, just some range with move-only iterators.

Good point, have added a test

@vitaut vitaut merged commit e60ff50 into fmtlib:master Jul 9, 2024
@vitaut
Copy link
Copy Markdown
Contributor
vitaut commented Jul 9, 2024

Merged, thanks!

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.

trunk doesn't work with std::generator

2 participants

0