Bug 1981085

Summary: error: missing 'typename' prior to dependent type name in <ranges> elements_view (when compiling libstdc++ with clang) [PATCH AVAILABLE]
Product: [Fedora] Fedora Reporter: Avi Kivity <avi.kivity>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 34CC: aoliva, dmalcolm, fweimer, jakub, jwakely, law, mpolacek, msebor, nickc, sipoyare
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-12 09:45:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Avi Kivity 2021-07-11 10:50:19 UTC
Description of problem:


Due to lagging C++20 support in Clang, it fails to compile a function in <ranges>.

This was already fixed in gcc trunk and backported, so it can be fixed by refreshing the branch.

Version-Release number of selected component (if applicable):
gcc-11.1.1-3.fc34

How reproducible:
Always

Steps to Reproduce:
1. write some code using std::ranges::elements_view
2. build it with clang due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95137
3. see error

Actual results:

/usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/ranges:3392:19: error: missing 'typename' prior to dependent type name 'iterator_traits<iterator_t<_Base>>::iterator_category'
            using _Cat = iterator_traits<iterator_t<_Base>>::iterator_category;


Expected results:


No error.

Additional info:

Fixed upstream and backported to the gcc-11 branch.

Comment 1 Jonathan Wakely 2021-07-12 09:45:23 UTC

*** This bug has been marked as a duplicate of bug 1971443 ***