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

cardinality of zip of known cardinalities is only finite #1486

Closed
dvirtz opened this issue May 10, 2020 · 0 comments
Closed

cardinality of zip of known cardinalities is only finite #1486

dvirtz opened this issue May 10, 2020 · 0 comments

Comments

@dvirtz
Copy link
Contributor

dvirtz commented May 10, 2020

The last static assert in the following code should succeed but fails, as the actual value is finite:

int ai[] = {1, 2, 3};
int bi[] = {4, 5, 6};
static_assert(range_cardinality<decltype(ai)>::value == 3);
static_assert(range_cardinality<decltype(bi)>::value == 3);
auto zipped = views::zip(ai, bi);
static_assert(range_cardinality<decltype(zipped)>::value == 3);

see https://gcc.godbolt.org/z/_DGT6g

ericniebler added a commit that referenced this issue May 12, 2020
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

1 participant