Skip to content

Incorrect behavior of itertools::product for empty range argument #4

@Wentzell

Description

@Wentzell

Description

When one of the ranges passed to itertools::product is an empty range, the resulting product range should be empty.
Currently this is not the case.

Steps to Reproduce

This test currently fails

long count = 0;
for (auto [l, m] : product_range(0, 5)) ++count;
EXPECT_EQ(count, 0);

Versions

d10e86d

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions