https://bugs.llvm.org/show_bug.cgi?id=49511

            Bug ID: 49511
           Summary: Compilation error when applying std::views::transform
                    to std::array
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

Unfortunately the following code fails to compile (using the STL of g++-10.2):

==== begin test program ====
#include <ranges>
#include <array>

std::array<int,2> points_;

auto foo()  {
    auto v = std::views::transform([](int p) {return p;});
    return points_ | v;
}

int main() {
    auto z = foo();
}
==== end test program ====

The same code compiles without problems using g++-10.2 so I think it should be
valid code...

See also https://godbolt.org/z/e1ncvW

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to