Bug 1981085 - error: missing 'typename' prior to dependent type name in <ranges> elements_view (when compiling libstdc++ with clang) [PATCH AVAILABLE]
Summary: error: missing 'typename' prior to dependent type name in <ranges> elements_v...
Keywords:
Status: CLOSED DUPLICATE of bug 1971443
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 34
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-11 10:50 UTC by Avi Kivity
Modified: 2021-07-12 09:45 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-12 09:45:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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 ***


Note You need to log in before you can comment on or make changes to this bug.