-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 |
wip.. We seem to hit llvm/llvm-project#52696 See: https://godbolt.org/z/7abh7rzaP ``` /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/iterator_concepts.h:979:13: error: no matching function for call to '__begin' = decltype(ranges::__cust_access::__begin(std::declval<_Tp&>())); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Currently our jammy ci (jenkins) builders are only able to (apt) install clang 14 as the latest version available. Clang stable is already at 19 today (i.e we're 5 major releases behind). Meaning, full support of C++20 and some bugs [1] requiring us to update the compiler used for make check. As updating to Ubuntu 24 is not feasable in the near future and containerized builds is not yet merged - with this patch, we would get clang-16 directly form llvm installation script. Note: discover_compiler() would prefer clang-16 even if clang-14 will be installed by apt in INSTALL_EXTRA_PACKAGES defined below. [1] llvm/llvm-project#52696 Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Currently our jammy ci (jenkins) builders are only able to (apt) install clang 14 as the latest version available. Clang stable is already at 19 today (i.e we're 5 major releases behind). Meaning, full support of C++20 and some bugs [1] requiring us to update the compiler used for make check. As updating to Ubuntu 24 is not feasable in the near future and containerized builds is not yet merged - with this patch, we would get clang-16 directly form llvm installation script. Note: discover_compiler() would prefer clang-16 even if clang-14 will be installed by apt in INSTALL_EXTRA_PACKAGES defined below. [1] llvm/llvm-project#52696 Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Currently our jammy ci (jenkins) builders are only able to (apt) install clang 14 as the latest version available. Clang stable is already at 19 today (i.e we're 5 major releases behind). Meaning, full support of C++20 and some bugs [1] requiring us to update the compiler used for make check. As updating to Ubuntu 24 is not feasable in the near future and containerized builds is not yet merged - with this patch, we would get clang-16 directly form llvm installation script. Note: discover_compiler() would prefer clang-16 even if clang-14 will be installed by apt in INSTALL_EXTRA_PACKAGES defined below. [1] llvm/llvm-project#52696 Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Currently our jammy ci (jenkins) builders are only able to (apt) install clang 14 as the latest version available. Clang stable is already at 19 today (i.e we're 5 major releases behind). Meaning, full support of C++20 and some bugs [1] requiring us to update the compiler used for make check. As updating to Ubuntu 24 is not feasable in the near future and containerized builds is not yet merged - with this patch, we would get clang-16 directly form llvm installation script. Note: discover_compiler() would prefer clang-16 even if clang-14 will be installed by apt in INSTALL_EXTRA_PACKAGES defined below. [1] llvm/llvm-project#52696 Signed-off-by: Matan Breizman <mbreizma@redhat.com>
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: