Skip to content

Clang does not find begin/end of std::array wrapped in range view #45186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
llvmbot opened this issue May 8, 2020 · 2 comments
Closed

Clang does not find begin/end of std::array wrapped in range view #45186

llvmbot opened this issue May 8, 2020 · 2 comments
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

Comments

@llvmbot
Copy link
Member

llvmbot commented May 8, 2020

Bugzilla Link 45841
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @zygoloid

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> &]

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@royjacobson
Copy link
Contributor

Works after https://reviews.llvm.org/D126907, so this was a duplicate of #44178

@royjacobson royjacobson closed this as not planned Won't fix, can't repro, duplicate, stale Sep 23, 2022
@royjacobson royjacobson moved this to Done in C++ 20 in Clang Sep 23, 2022
@royjacobson royjacobson added the duplicate Resolved as duplicate label Sep 23, 2022
@EugeneZelenko EugeneZelenko added clang:frontend Language frontend issues, e.g. anything involving "Sema" concepts C++20 concepts labels Sep 23, 2022
@llvmbot
Copy link
Member Author

llvmbot commented Sep 23, 2022

@llvm/issue-subscribers-clang-frontend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
Status: Done
Development

No branches or pull requests

3 participants