Clang does not find begin/end of std::array wrapped in range view #45186
Labels
bugzilla
Issues migrated from bugzilla
c++20
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
concepts
C++20 concepts
duplicate
Resolved as duplicate
Extended Description
The following code compiles on GCC-10 (which now implements the header) and produces 3,2,1 as output.
#include
#include
#include
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 '' [with _Range = std::array<int, 3> &]
The text was updated successfully, but these errors were encountered: