-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
C++20 ranges/views are broken, via std::ranges::ref_view - iterator_concepts.h:980:13: error: no matching function for call to '__begin' #52696
Comments
Clang on Godbolt uses libstdc++ by default, not libc++. You need to pass If you do that, you will see that libc++ does not implement all of ranges yet, but we're working on it. In fact, we don't even enable Ranges in the version of LLVM we ship (e.g. 12.0) because we wanted to have a coherent whole before shipping anything. TLDR: You should report this bug to libstdc++ instead, and you should drop your whiny tone that makes it sound as-if the people who contribute to these OPEN SOURCE projects owe you something, cause that's not helping your case. |
Thanks for the explanation, and I apologise for my previous tone. |
Please don't, we have more than one report for this already, and it's a Clang bug: #44178 |
@llvm/issue-subscribers-clang-frontend |
this is fixed as of the latest commit |
It seems that range view adaptors don't work. The following example of trying to use ranges gives a pile of errors, seemingly related to
ref_view
being broken.This is available on Compiler Explorer running Clang x86-64 trunk here: https://godbolt.org/z/7abh7rzaP - but the same happens in released version 13 there and on Debian
The same is true of the simple (recently edited, now compliant) example code from https://en.cppreference.com/w/cpp/ranges/transform_view ...
... as can be seen on Compiler Explorer running Clang x86-64 trunk here - https://godbolt.org/z/xzdzjxaj4 ...
These are the errors from the 1st example:
and 2nd:
The text was updated successfully, but these errors were encountered: