Skip to content

taskflow find_if doesn't work with infinite ranges because std::distance is used #534

Description

@bradphelan

In taskflow::find_if doesn't work with infinite ranges.

However an infinite range is a reasonable input to find_if. For example

std::ranges::iota(0)

produces an infinite range starting from 0.

However taskflow::find_if calls std::distance on the two iterators which cannot work if the second iterator is a sentinel std::unreachable_sentinel

In this case taskflow::find_if should find a sensible alternative to chunking. In our case we explicitly pass StaticPartitioner(1) so we don't require chunking.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions