Skip to content

<numeric>: transform_inclusive_scan passes output values to the binary (reduce) operation #3783

Description

@akrivx

Describe the bug

The overload of transform_inclusive_scan that takes execution policy and initial value arguments passes the result of dereferencing the output iterator to the binary reduce operation.

Doing so requires that the output value type can be converted to the types expected by the binary operation.

Command-line test case

See this example here: https://godbolt.org/z/4fscYPcTW
It's working fine with the latest gcc.

Expected behavior

transform_inclusive_scan does not pass the result of dereferencing the output iterator to the binary operation.

STL version

Microsoft Visual Studio Community 2022 (64-bit)
Version 17.6.2

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

    bugSomething isn't workingfixedSomething works now, yay!

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions