[llvm-bugs] [Bug 49511] New: Compilation error when applying std::views::transform to std::array
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Mar 10 06:28:10 PST 2021
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: unassignedclangbugs at nondot.org
Reporter: raffael at casagrande.ch
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210310/f0ca42ea/attachment.html>
More information about the llvm-bugs
mailing list