https://bugs.llvm.org/show_bug.cgi?id=45841
Bug ID: 45841
Summary: Clang does not find begin/end of std::array wrapped in
range view
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++2a
Assignee: unassignedclangb...@nondot.org
Reporter: rhalber...@gmail.com
CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk
The following code compiles on GCC-10 (which now implements the <ranges>
header) and produces 3,2,1 as output.
#include <array>
#include <iostream>
#include <ranges>
int main()
{
auto arr = std::array{1, 2, 3};
for (auto elem: std::ranges::reverse_view(arr)) {
std::cout << elem << ",";
}
}
Compiling this with Clang-trunk on godbolt.org (https://godbolt.org/z/UA7W_E)
gives an error that it cannot find begin/end of the std::array wrapped in the
std::ranges::reverse_view adaptor, apparently because of misunderstood
deduction guide:
while substituting deduced template arguments into function template
'<deduction guide for reverse_view>' [with _Range = std::array<int, 3> &]
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs